All Repeating Except Two

easy
1. You are given an array of numbers.
2. You have to find 2 non-repeating numbers in an array.
3. All repeating numbers are repeating even number of times.

Input Format

A number n a1 a2.. n numbers

Output Format

2 Non-repeating number

Constraints

1 <= n <= 10^9
1 <= a1,a2.. <= 10^9 

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
6
23 27 23 17 17 37
Output
27
37
Previous
All Repeating Except One
Next
All Repeating Three Times Except One

Related Questions