N,K=map(int,input().split()) A=list(map(int,input().split())) for i in range(K): A[i]-=1 for i in range(K-1): if A[i+1]-A[i]>20: N-=A[i+1]-A[i]-20 for j in range(K-1,i,-1): A[j]-=A[i+1]-A[i]-20 if N-A[-1]>20: N=A[-1]+20 A=set(A) DP=[1]*(N+5) for i in range(N-2,-1,-1): if i in A: DP[i]=0 continue for j in range(1,7): DP[i]&=(DP[i+j]|DP[i+7-j]) if DP[0]: print('Yes') else: print('No')