#include <bits/stdc++.h>
using namespace std;
bool sieve[1001];
int val[500], k = 0;
void sieve_of_erato() {
  int i;
  memset(sieve, 0, sizeof(sieve));
  for (i = 2; i * i <= 1001; i++) {
    if (!sieve[i]) {
      for (int j = 2 * i; j <= 1001; j += i) sieve[j] = 1;
    }
  }
  for (i = 2; i <= 1001; i++)
    if (!sieve[i]) val[k++] = i;
}
int main() {
  sieve_of_erato();
  int n, m, count = 0, sum = 0;
  cin >> n >> m;
  for (int i = 1; i < k; i++) {
    sum += val[i] + val[i - 1];
    if (sum < n && !sieve[sum + 1]) {
      count++;
    }
    if (sum > n) break;
    sum = 0;
  }
  if (count >= m)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
