#include <bits/stdc++.h>
using namespace std;
vector<int> Sieve(int n) {
  bool prime[n + 1];
  memset(prime, true, sizeof(prime));
  std::vector<int> v;
  for (int p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (int i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
  for (int p = 2; p <= n; p++)
    if (prime[p]) v.push_back(p);
  return v;
}
int main() {
  long long int n, k, c = 0;
  cin >> n >> k;
  std::vector<int> p, sum;
  p = Sieve(n);
  long long int len = p.size();
  for (int i = 0; i < len; ++i) {
    long long int t = (p[i] + p[i + 1] + 1);
    for (auto x : p) {
      if (t == x) c++;
    }
  }
  if (c >= k)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
