#coding:utf-8 get = input() get = get.split(" ") get = list(map(int,get)) get1 = input() get1 = get1.split(" ") get1 = list(map(int,get1)) ans = get[1] #5 sum_list = sum(get1) #15 if((sum_list / get[0]) == ans): print("YES") else: print("NO")