# -*- coding: utf-8 -*- n, a = map(int,input().split()) x = list(map(int,input().split())) if sum(x) / n == float(a): print("YES") else: print("NO")