~/algor $ cat problems/bit-ikki-juftsiz
Two unpaired numbers
Medium
1000 ms
128 MB
47%
An array of $n$ integers is given. Two different numbers in it occur once each, and every other number occurs exactly twice. Print the two numbers that occur once, in increasing order.
Input
The first line contains an even positive integer $n$. The second line contains $n$ integers $a_{i}$.
Output
Two numbers separated by a space — in increasing order.
Note
$2 \le n \le 2 \cdot 10^{5}$
$0 \le a_{i} \le 10^{9}$
Examples
Input #1
6 4 7 9 4 2 9
Output #1
2 7
Input #2
2 0 1000000000
Output #2
0 1000000000