Petya and Vasya decided to play a game. They have n cards (n is an even number). A single integer is written on each card.

Before the game Petya will choose an integer and after that Vasya will choose another integer (different from the number that Petya chose). During the game each player takes all the cards with number he chose. For example, if Petya chose number 5 before the game he will take all cards on which 5 is written and if Vasya chose number 10 before the game he will take all cards on which 10 is written.

The game is considered fair if Petya and Vasya can take all n cards, and the number of cards each player gets is the same.

Determine whether Petya and Vasya can choose integer numbers before the game so that the game is fair. 


-----Input-----

The first line contains a single integer n (2 ≤ n ≤ 100) — number of cards. It is guaranteed that n is an even number.

The following n lines contain a sequence of integers a_1, a_2, ..., a_{n} (one integer per line, 1 ≤ a_{i} ≤ 100) — numbers written on the n cards.


-----Output-----

If it is impossible for Petya and Vasya to choose numbers in such a way that the game will be fair, print "NO" (without quotes) in the first line. In this case you should not print anything more.

In the other case print "YES" (without quotes) in the first line. In the second line print two distinct integers — number that Petya should choose and the number that Vasya should choose to make the game fair. If there are several solutions, print any of them.


-----Examples-----
Input
4
11
27
27
11

Output
YES
11 27

Input
2
6
6

Output
NO

Input
6
10
20
30
20
10
20

Output
NO

Input
6
1
1
2
2
3
3

Output
NO



-----Note-----

In the first example the game will be fair if, for example, Petya chooses number 11, and Vasya chooses number 27. Then the will take all cards — Petya will take cards 1 and 4, and Vasya will take cards 2 and 3. Thus, each of them will take exactly two cards.

In the second example fair game is impossible because the numbers written on the cards are equal, but the numbers that Petya and Vasya should choose should be distinct.

In the third example it is impossible to take all cards. Petya and Vasya can take at most five cards — for example, Petya can choose number 10 and Vasya can choose number 20. But for the game to be fair it is necessary to take 6 cards.

Difficulty: interview

Starter code:

Solutions:
def list_input():
    return list(map(int,input().split()))
def map_input():
    return map(int,input().split())
def map_string():
    return input().split()
    
n = int(input())    
a = []
for _ in range(n):
	a.append(int(input()))
b = list(set(a[::]))
if(len(b) == 2 and a.count(a[0]) == n//2):
	print("YES")
	print(b[0],b[1])	
else: print("NO")	

n = int(input())
a = [int(input()) for i in range(n)]
b = list(set(a))
if len(b) == 2 and a.count(b[0]) == a.count(b[1]) == n // 2:
    print('YES')
    print(*b)
else:
    print('NO')

n = int(input())

a = [int(input()) for _ in range(n)]

s = list(set(a))
if len(s) == 2 and a.count(s[0]) == a.count(s[1]):
    print('YES')
    print(*s)
else:
    print('NO')


n = int(input())
a = [int(input()) for i in range(n)]
a.sort()
b = [ai for ai in a if ai==a[0]]
c = [ai for ai in a if ai!=a[0]]
if len(b)==len(c) and c[0]==c[-1]:
    print('YES')
    print(b[0], c[0])
else:
    print('NO')

from sys import stdin, stdout

n = int(stdin.readline().rstrip())
cards = []
for _ in range(n):
    cards.append(int(stdin.readline().rstrip()))
    
n1 = max(cards)
n2 = min(cards)

c1 = cards.count(n1)
c2 = cards.count(n2)

if c1==c2 and c1+c2==n and n1!=n2:
    print('YES')
    print(str(n1) + ' ' + str(n2))
else:
    print('NO')


n=int(input())
a=[int(input()) for i in range(n)]

s=set(a)
if len(s)!=2:
	print('NO')
	return

b=list(s)
if a.count(b[0])==a.count(b[1]):
	print('YES')
	print(b[0],b[1])
else:
	print('NO')


from collections import Counter

n = int(input())

c = list()

for i in range(n):
    c.append(int(input()))

c = Counter(c)

d = dict()

for k in c:
    v = c[k]
    if d.get(v, -1) != -1:
        d[v].append(k)
    else:
        d[v] = [k]

fl = False
for k in d:
    v = d[k]
    if len(v) > 1 and len(d) == 1 and len(v) == 2:
        fl = True
        print("YES")
        print(*v)
        break
if (not fl):
    print("NO")

n = int(input())

d = {}

for _ in range(n):
    t = int(input())
    if t not in d:
        d[t] = 0
    d[t] += 1

if len(d) != 2:
    print("NO")
    return

k = list(d.keys())

if d[k[0]] != d[k[1]]:
    print("NO")
else:
    print("YES")
    print(str(k[0]) + " " + str(k[1]))



n=int(input())
l=[]
for i in range(n):
    l+=[int(input())]
l.sort(key=int)
if l.count(l[0])==n>>1 and l.count(l[-1])==n>>1:
    print("YES")
    print(l[0],l[-1])
else:
    print("NO")


n = int(input())
l = [0]*n
for i in range(n):
	l[i]=int(input())
l.sort()
if l.count(l[0])==l.count(l[n-1])==n/2:
	print('YES')
	print(l[0] , l[n-1])
else:
	print("NO")

def solve():

    n = int(input())
    nums = [int(input()) for i in range(n)]
    numdict = {}

    for num in nums:
        if num in numdict:
            numdict[num] += 1
        else:
            numdict[num] = 1

    if len(numdict) != 2:
        print("NO")

    else:
        nums = list(numdict.keys())
        if numdict[nums[0]] == numdict[nums[1]]:
            print("YES")
            print(nums[0], nums[1])
        else:
            print("NO")

    return

solve()


n = int(input())
d = {}
for i in range(n):
    val = int(input())
    if val in list(d.keys()):
        d[val] += 1
    else:
        d[val] = 1
for i in list(d.keys()):
    for j in list(d.keys()):
        if i==j:
            continue
        if d[i] == d[j]:
            if d[i]+d[j] == n:
                print('YES')
                print(i,j)
                quit()
print('NO')


cardNum = int(input())

cards = [input() for i in range(cardNum)]

values = {}
if len(set(cards)) > 2:
    print("NO")
else:
    for card in set(cards):
        value = cards.count(card)
        if value in values:
            print("YES")
            print(card, values[value])
            break
        values[value] = card
    else:
        print("NO")


def readln(): return list(map(int, input().rstrip().split()))


n = int(input())
data = []
for i in range(0, n):
    data.append(input())

x = data[0]
data = list([a for a in data if a != x])
cx = n - len(data)

if len(data) == 0:
    print("NO")
    return

y = data[0]
data = list([a for a in data if a != y])
cy = n - cx - len(data)

if cx != cy or len(data) != 0:
    print("NO")
else:
    print("YES")
    print("{} {}".format(x, y))


n = int(input())
L = [0] * 101
for i in range(n):
    L[int(input())] += 1
S = set()
for i in range(len(L)):
    if L[i]:
        S.add(i)
if len(S) == 2:
    M = list(S)
    if L[M[0]] == L[M[1]]:
        print('YES')
        print(M[0], M[1])
    else:
        print('NO')    
else:
    print('NO')


#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from collections import Counter

def main():
    N = int(input())
    A = [int(input()) for _ in range(N)]

    cnt = Counter(A)
    if len(cnt) != 2:
        print("NO")
        return

    ps = list(cnt.items())
    if ps[0][1] != ps[1][1]:
        print("NO")
        return

    print("YES")
    print(ps[0][0], ps[1][0])

def __starting_point(): main()

__starting_point()

#python3
#utf-8
from collections import Counter

cards_nr = int(input())
number_counter = Counter()

for _ in range(cards_nr):
    curr_number = int(input())
    number_counter[curr_number] += 1

if len(number_counter) != 2:
    print('NO')
else:
    num1, num2 = list(number_counter)
    if number_counter[num1] != number_counter[num2]:
        print('NO')
    else:
        print('YES')
        print(num1, num2)


n = int(input())
a = [int(input()) for _ in range(n)]

cnt = {}
for ai in a:
    if ai in cnt:
        cnt[ai] += 1
    else:
        cnt[ai] = 1
ans = []
for k, v in list(cnt.items()):
    if v * 2 == n:
        ans.append(k)
if len(cnt) != 2:
    ans = []
if len(ans) == 2:
    print("YES")
    print(' '.join(map(str, ans)))
else:
    print("NO")


n = int(input())
arr = []
for _ in range(n):
	arr.append(int(input()))
if(len(set(arr)) != 2 or n%2 == 1):
	print('NO')
else:
	a,b = map(int, list(set(arr)))
	if(arr.count(a) == arr.count(b)):
		print('YES')
		print(a,b)
	else:
		print('NO')

a=[]
b=[]
for i in range(int(input())):
    a.append(int(input()))
b=list(set(a))
 
if len(b)!=2:
    print('NO')
elif a.count(b[0])==a.count(b[1]):
    print('YES')
    b.sort()
    print(*b)
else:
    print('NO')


from collections import defaultdict

n = int(input())
arr = []
nums = set()
f = defaultdict(int)

for _ in range(n):
	arr.append(int(input()))

if n % 2 == 1:
	print("NO")
	return

for num in arr:
	nums.add(num)
	f[num] += 1
	if len(nums) > 2:
		print("NO")
		return

nums = list(nums)

if len(nums) == 2:
	if f[nums[0]] == f[nums[1]]:
		print("YES")
		print(nums[0], nums[1])
		return
		
print("NO")


from collections import Counter
n = int(input())
a = Counter()
for _ in range(n):
    a[int(input())] += 1

try:
    x, y = a.popitem(), a.popitem()
except KeyError:
    print('NO')
    return
if not a and x[1] == y[1]:
    print('YES')
    print(x[0], y[0])
else:
    print('NO')


n = int(input())
A = []
D = {}
k = []
for i in range(n):
    x = int(input())
    A.append(x)
    if x not in D:
        D[x] = 0
        k.append(x)
    D[x] += 1
if(len(D)!=2):
    print ("NO")
elif(D[k[0]] == D[k[1]]):
    print ("YES")
    print(k[0],k[1])
else:
    print ("NO")