N,X=map(int,input().split()) C=set(map(int,input().split())) print("Yes" if min(C)<X<max(C) or (X in C) else "No")