#include <bits/stdc++.h>
using namespace std;
bool prime[1000000];
vector<int> vec;
void sieve() {
  memset(prime, 1, sizeof prime);
  prime[0] = prime[1] = 0;
  for (int i = 2; i * i <= 1000000; i++) {
    if (!prime[i]) continue;
    for (int j = 2 * i; j <= 1000000; j += i) {
      prime[j] = 0;
    }
  }
  for (int i = 0; i < 1000000; i++)
    if (prime[i]) vec.push_back(i);
}
int main() {
  int n, k, i = 1;
  sieve();
  cin >> n >> k;
  vector<long long> vec2;
  while (vec[i] <= n) {
    if (prime[vec[i] + vec[i - 1] + 1] && vec[i] + vec[i - 1] + 1 <= n)
      vec2.push_back(vec[i] + vec[i - 1] + 1);
    i++;
  }
  if (vec2.size() >= k)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
