#include <bits/stdc++.h>
using namespace std;
bool a[1000005] = {1, 1};
long long n, k, s;
vector<long long> pri;
void prime(long long x) {
  for (long long i = 2; i <= x; i++) {
    if (!a[i]) pri.push_back(i);
    for (long long j = 0; j < pri.size() && pri[j] * i <= x; j++) {
      a[pri[j] * i] = 1;
      if (i % pri[j] == 0) break;
    }
  }
}
int main() {
  cin >> n >> k;
  prime(n);
  for (long long i = 0; i < pri.size() - 1; i++)
    if (a[pri[i] + pri[i + 1] + 1] == 0 && pri[i] + pri[i + 1] + 1 <= n) s++;
  if (s < k)
    cout << "NO";
  else
    cout << "YES";
  return 0;
}
