Input (grade 9): The territory was declared an independent nation in 1977, and changed its name to the Republic of Djibouti. Djibouti joined the United Nations on September 20, 1977.
Output (grade 5): Djibouti gained its independence on June 27, 1977.