import heapq N,K = list(map(int,input().split())) A = set(map(int,input().split())) q = list([-i for i in A]) heapq.heapify(q) while(q): now = heapq.heappop(q);now *= -1 for x in range(1,7): if(now + 7 - 2*x in A and now - x > 0): A.add(now - x) heapq.heappush(q, -(now - x)) print("Yes" if 1 not in A else "No")