LogiQuest

325. Two Numbers with Odd Counts

MediumXOR

Exactly two distinct values occur an odd number of times; all others occur an even number of times. Print the two values in increasing order.

Input format

Line 1: n Line 2: n integers

Output format

The two values.

Example 1

Input

6
1 2 1 3 2 5

Output

3 5

Example 2

Input

2
-1 0

Output

-1 0

Constraints

2 ≤ n ≤ 10⁵

Read input from standard input and print the answer to standard output. Your code is judged against 3 test cases, most of them hidden.

Loading the MyLoginn IDE…