#define _USE_MATH_DEFINES #include using namespace std; signed main() { long long n, k; cin >> n >> k; vector a(k); for (auto& x : a) cin >> x; long long m = min(n, 1000LL); vector dp(m + 1, 1); for (long long i = m; i >= 1; i--) { for (int j = 0; j < k; j++) { long long x = a[j]; if (x == i) dp[i] = 0; } if (i + 1 <= m && i + 6 <= m) { if (!dp[i + 1] && !dp[i + 6]) dp[i] = 0; } if (i + 2 <= m && i + 5 <= m) { if (!dp[i + 2] && !dp[i + 5]) dp[i] = 0; } if (i + 3 <= m && i + 4 <= m) { if (!dp[i + 3] && !dp[i + 4]) dp[i] = 0; } } if (!dp[1]) { cout << "No" << endl; return 0; } for (int i = 0; i < k; i++) for (int j = 0; j < k; j++) { long long x = a[i]; long long y = a[j]; long long dif = abs(x - y); if (dif == 1 || dif == 3 || dif == 5) { long long mi = min(x, y); if (mi - 8 >= 1) { cout << "No" << endl; return 0; } } } cout << "Yes" << endl; return 0; }