Given a sequence of integers, we say that an integer is opposite-supported in the sequence if both and appear in it. Write a program that finds a frequent opposite-supported number in a sequence.
Input starts with a non-negative integer that indicates the desired frequency. Then, a sequence of integers follows, possibly distributed along several lines.
Write the absolute value of the first integer in the sequence that is found both to appear at least times in it and to be opposite-supported in it. Write "NONE" if no such integer is found.
Input
3 1 -2 3 -1 2 1 -3 1
Output
1
Input
33 1 -2 3 -1 2 1 -3 1
Output
NONE
Input
3 -5 -5 -6 -6 -5 7 6 -6 7 -7 5 7
Output
6
Input
3 1111111111111111 -5 -5 -6 -6 -5 7 -6 7 -7 -6 6 5 7
Output
6