#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  bool was[n + 1];
  was[0] = was[1] = false;
  for (int i = 2; i <= n; ++i) {
    was[i] = true;
  }
  for (int i = 2; i <= sqrt(n); ++i) {
    if (!was[i]) {
      continue;
    }
    for (int j = 2 * i; j <= n; j += i) {
      was[j] = false;
    }
  }
  vector<int> primes;
  for (int i = 2; i <= n; ++i) {
    if (was[i]) {
      primes.push_back(i);
    }
  }
  int cnt = 0;
  for (int i = 2; i < primes.size(); ++i) {
    for (int j = 0; j < i - 1; ++j) {
      if (primes[j] + primes[j + 1] + 1 == primes[i]) {
        cnt++;
      }
    }
  }
  if (cnt >= k) {
    cout << "YES\n";
  } else {
    cout << "NO\n";
  }
  return 0;
}
