n,k=map(int,input().split()) a=[*map(int,input().split())] if k in a: print('YES') else: print('NO')