def main(): n, a = map(int, input().split()) score = list(map(int, input().split())) if n * a == sum(score): print("YES") else: print("NO") if __name__ == "__main__": main()