By Francisco Elio Parente Arcos Filho, UEA Brazil
You will be given an array of N numbers, where everyone will be in pairs. But two of those numbers ended up without peer, these numbers are said apaixornados numbers, you can identify what are that numbers?
For example, A = {1, 1, 3, 3, 5, 5, 5,7}, the apaixornados numbers are 5 and 7.
The input consists of several test cases. Each test case is composed of a line having an integer N (1 ≤ N ≤ 105), followed by N numbers (-1012 < A < 1012). The input ends when N = 0 and it should not to be processed.
For each test case print only the apaixornados numbers in ascending order. It is guaranteed that only two numbers are alone.
Input Sample | Output Sample |
6 |
4 7 |