Kitahara Haruki has bought n apples for Touma Kazusa and Ogiso Setsuna. Now he wants to divide all the apples between the friends.

Each apple weights 100 grams or 200 grams. Of course Kitahara Haruki doesn't want to offend any of his friend. Therefore the total weight of the apples given to Touma Kazusa must be equal to the total weight of the apples given to Ogiso Setsuna.

But unfortunately Kitahara Haruki doesn't have a knife right now, so he cannot split any apple into some parts. Please, tell him: is it possible to divide all the apples in a fair way between his friends?


-----Input-----

The first line contains an integer n (1 ≤ n ≤ 100) — the number of apples. The second line contains n integers w_1, w_2, ..., w_{n} (w_{i} = 100 or w_{i} = 200), where w_{i} is the weight of the i-th apple.


-----Output-----

In a single line print "YES" (without the quotes) if it is possible to divide all the apples between his friends. Otherwise print "NO" (without the quotes).


-----Examples-----
Input
3
100 200 100

Output
YES

Input
4
100 100 100 200

Output
NO



-----Note-----

In the first test sample Kitahara Haruki can give the first and the last apple to Ogiso Setsuna and the middle apple to Touma Kazusa.

Difficulty: interview

Starter code:

Solutions:
"""
Codeforces Round 248 Div 2 Problem A

Author  : chaotic_iak
Language: Python 3.3.4
"""

class InputHandlerObject(object):
    inputs = []

    def getInput(self, n = 0):
        res = ""
        inputs = self.inputs
        if not inputs: inputs.extend(input().split(" "))
        if n == 0:
            res = inputs[:]
            inputs[:] = []
        while n > len(inputs):
            inputs.extend(input().split(" "))
        if n > 0:
            res = inputs[:n]
            inputs[:n] = []
        return res
InputHandler = InputHandlerObject()
g = InputHandler.getInput

############################## SOLUTION ##############################
n = int(input())
a = [int(x) for x in g()]
c100 = a.count(100)
if sum(a) % 200:
    print("NO")
elif n % 2 and not c100:
    print("NO")
else:
    print("YES")

n = int(input())
arr = list(map(int, input().split()))
if sum(arr) % 200 == 0 and arr.count(100) > 0 or sum(arr) % 400 == 0:
    print('YES')
else:
    print('NO')

n = int(input())
weights = list(map(int, input().split()))

if weights.count(200) % 2 == 0:
    if weights.count(100) % 2 == 0:
        print("YES")
    else:
        print("NO")
else:
    if weights.count(100) % 2 == 0 and weights.count(100) >= 2:
        print("YES")
    else:
        print("NO")


n = int(input())
w = sorted(list(map(int, input().split())), reverse=True)
h = sum(w) // 2
ans = 0
for i in w:
    if h >= ans + i:
        ans += i
    if h == ans:
        print("YES")
        break
if h != ans:
    print("NO")


#!/usr/bin/env python

def main( ):
    n = int( input( ) )
    w = list( map( int, input( ).split( ) ) )
    w100, w200 = w.count( 100 ), w.count( 200 )

    for i in range( w100 + 1 ):
        for j in range( w200 + 1 ):
            if i + 2 * j == w100 - i + 2 * w200 - 2 * j:
                print( "YES" )
                return
    print( "NO" )

def __starting_point():
    main( )


__starting_point()

n = int(input())
w = list(map(int, input().split()))

one_hundred = w.count(100)
two_hundred = w.count(200)

if one_hundred % 2 == 1 or (two_hundred % 2 == 1 and one_hundred == 0):
    print('NO')
else:
    print('YES')


a = int(input())
b = list(map(int, input().split()))

big = b.count(200)
s   = b.count(100)

if (big%2==0 and s%2==0) or (s%2==0 and s>=2):
    print('YES')
else:
    print('NO')


import sys
f = sys.stdin

n = int(f.readline().strip())

a = [int(u) for u in f.readline().strip().split()]

a = sorted(a, reverse=True)
W1 =0
W2 = 0

for i in range(int(n/2)):
    W1 += a[2*i]
    W2 += a[2*i+1]

if n % 2 == 1:
    W2 += a[n-1]

    
if W1==W2 :res = 'YES'
else: res = 'NO'

print(res)



from sys import stdin as cin
from itertools import product
from bisect import bisect_left as bl
from collections import Counter

n = int(cin.readline())
a=list((list(map(int,cin.readline().split()))))

c = Counter(a)


if (c[100]%2==0 and c[200]%2==0)or (( c[200]%2 !=0) and(c[100]%2==0 and c[100]>1)):
    print('YES')
else:
    print('NO')


n = int(input().strip())
a = list(map(int, input().split()))
k = sum(a) / 2
if (k == int(k)):
    k = int(k)
    f = [0] * (k + 1)
    f[0] = 1
    for i in range(len(a)):
        f_n = f[:]
        for z in range(a[i], k + 1):
            if f[z - a[i]] == 1:
                f_n[z] = 1
        f = f_n
    print('YES' if f[k] == 1 else 'NO')
else:
    print('NO')


import math
n = int(input())
w = list(map(int, input().split()))
x = 100
y = 200
tot = sum(w)
remain = (tot/2) % 100
if n % 2 != 0 and ((x not in w) or (y not in w)):
    print("NO")
elif remain == 50 :
    print("NO")
else:
    print("YES")


n = int(input())
wn = list(map(int, input().split()))
if sum(wn) % 200 == 0 and n % 2 != 1:
    print("YES")
elif sum(wn) // n == 200:
    print("NO")
elif sum(wn) % 200 != 0:
    print("NO")
else:
    print("YES")


n = int(input())
cost = list(map(int,input().split()))
sum = 0
for a in cost:
    sum += a
if (cost.count(100) > 0 and cost.count(100) % 2 == 0) or sum % 400 == 0:
    print("YES")
else:
    print("NO")

'''
Codefoces #248 Div. 2
Problem A
Solver
'''
input()
l = [int(i) for i in input().split(' ')]
c = [l.count(100), l.count(200)]

if c[1] & 1:
	c[0] -= 2
	c[1] += 1

if c[0] >= 0 and not c[0] & 1:
	print('YES')
else:
	print('NO')


n = int(input())
a = list(map(int, input().split()))
s = sum(a)
if n == 1:
    print("NO")
else:
    if s % 200 == 0:
        if s // 200 == n and n % 2 == 1:
            print("NO")
        else:
            print("YES")
    else:
        print("NO")

n=int(input())

L=list(map(int,input().split()))
L.sort(reverse=True)
x=0
y=0

for i in range(n):
    if(x<y):
        x+=L[i]
    else:
        y+=L[i]
if(x==y):
    print("YES")
else:
    print("NO")


n = int(input())
a = sorted([int(x) for x in input().split()], reverse=True)
b1 = 0
b2 = 0
for i in a:
    if b1 >= b2:
        b2 += i
    else:
        b1 += i
if b1 == b2:
    print('YES')
else:
    print('NO')


n = int(input())
ds = len([s for s in input().split() if s == "200"])
cs = n - ds

if (cs % 2) == 1:
    print("NO")
elif cs > 1:
    print("YES")
elif ds % 2 == 1:
    print("NO")
else:
    print("YES")

count = int(input())
apples = input().split()
sto = apples.count('100')
dv = apples.count('200')

if sto % 2 == 1 or (dv % 2 == 1 and sto < 2):
    print('NO')
else:
    print('YES')


n = int(input())
M = sorted([int(x) // 100 for x in input().split()])

if sum(M) & 1:
    print("NO")
else:
    goal = sum(M) // 2
    if goal & 1:
        if M[0] == 1:
            print("YES")
        else:
            print("NO")
    else:
        print("YES")


n = int( input() )
w = list( map( int, input().split() ) )

w1, w2 = 0, 0

w.sort( reverse = True )

for num in w: 
    if ( w1 <= w2 ): 
        w1 += num
    else: 
        w2 += num
         
print ( "YES" ) if ( w1 == w2 ) else print ( "NO" )

n = int(input())
w = list(map(int, input().split()))
a = w.count(100)
b = w.count(200)
print("YES" if a % 2 == 0 and (b % 2 == 0 or a > 0) else "NO")

y=input()
x=input()
list=[]
n=0
while n<len(x):
    list.append(x[n:n+3])
    n+=4
a=list.count("100")
b=list.count("200")
fair="YES"
if a%2==1:
    fair="NO"
if a==0:
    if b%2==1:
        fair="NO"
print(fair)