n,k = map(int, input().split()) A = list(map(int, input().split())) s = [] for a in A: s.append(a) X = set(A) while s: v = s.pop() for x in range(1, 7): if v+7-2*x in X and v-x >= 1: X.add(v-x) s.append(v-x) #print(X) if 1 in X: print('No') else: print('Yes')