Ukrainian President Volodymyr Zelensky has said for the first time he would be willing to cede territory to Russia to end the war in his country.