n,a = map(int,input().split(' ')) sx = sum(map(int,input().split(' '))) if n * a == sx: print("YES") else: print("NO")