#include using namespace std; using LL = long long; using ULL = unsigned long long; #define rep(i,n) for(int i=0; i<(n); i++) ULL N; int K; ULL A[100]; bool G[2000] = {}; int main() { cin >> N >> K; rep(i, K) { cin >> A[i]; A[i]--; } rep(i, K - 1) { if (A[i] >= 500) if (A[i] + 6 > A[i + 1]) { cout << "No" << endl; return 0; } } rep(i, K) if (A[i] < 1000) G[A[i]] = true; for (int i = 999; i >= 0; i--) { if (G[i + 1] && G[i + 6]) G[i] = true; if (G[i + 2] && G[i + 5]) G[i] = true; if (G[i + 3] && G[i + 4]) G[i] = true; } cout << (G[0] ? "No" : "Yes") << endl; return 0; }