#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 9;
bool f[N + 5];
vector<int> primes;
void seive() {
  f[0] = f[1] = 1;
  for (int i = 1; i <= N; i++) {
    if (f[i]) continue;
    primes.push_back(i);
    for (long long j = (long long)i * i; j <= N; j += i) f[j] = 1;
  }
}
int main() {
  long long x, z;
  seive();
  cin >> x >> z;
  if (z == 0) {
    cout << "YES" << endl;
    return 0;
  }
  for (int i = 0; (primes[i] + primes[i + 1]) + 1 <= x; i++) {
    int v = primes[i] + primes[i + 1] + 1;
    if (v <= x && !f[v] && z != 0) z--;
    if (z == 0) {
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
  return 0;
}
