N, K = map(int, input().split()) A = list(map(int, input().split())) flag = True for i in range(K-1): if A[i] >= 5 and A[i+1] - A[i] == 1: flag = False A = [1] + A K = len(A) # print(A) for i in range(K): for j in range(1, 7): if (A[i] + j in A) and (A[i] + (7-j)) in A: flag = False if flag: print("Yes") else: print("No")