#include using namespace std; using ll = long long; constexpr char newl = '\n'; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); ll n; int K; cin >> n >> K; vector a(K); for (int i = 0; i < K; i++) { cin >> a[i]; } vector ban(30, false); for (int i = K - 2; i >= 0; i--) { ll diff = a[i + 1] - a[i]; if (diff == 1) { if (a[i] - 8 >= 1) { cout << "No\n"; return 0; } else { ban[a[i]] = true; ban[a[i] + 1] = true; for (int j : {3, 5, 6}) { if (a[i] - j > 0) ban[a[i] - j] = true; } } } else if (diff == 3) { if (a[i] - 5 >= 1) { cout << "No\n"; return 0; } else { ban[a[i]] = true; ban[a[i] + 3] = true; for (int j : {2, 3}) { if (a[i] - j > 0) ban[a[i] - j] = true; } } } else if (diff == 5) { if (a[i] - 9 >= 1) { cout << "No\n"; return 0; } else { ban[a[i]] = true; ban[a[i] + 5] = true; for (int j : {1, 4, 6, 7}) { if (a[i] - j > 0) ban[a[i] - j] = true; } } } } for (int i = 20; i >= 1; i--) { for (int j = 1; j <= 3; j++) { if (ban[i + j] && ban[i + 7 - j]) { ban[i] = true; } } } cout << (ban[1] ? "No" : "Yes") << newl; return 0; }