n=long(raw_input())
a=sorted(map(long, raw_input().split()))

if n % 3 != 0:
    print "No"
else:
    if len(set(a[0:n/3])) == 1 and len(set(a[n/3:n/3*2])) == 1 and len(set(a[n/3*2:n])) == 1:
        print "Yes"
    else:
        print "No"
