The two nations have agreed to denuclearize the peninsula and later this year formally end the war that began in 1950.