import numpy as np a = list(map(int,input().split())) if a[1] == int(np.mean(a[2:])): print("YES") else: print("NO")