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