#include <bits/stdc++.h>
using namespace std;
vector<int> primes;
bool isPrime(int n, vector<int> primes) {
  for (int i = 0; primes[i] <= sqrt(n); i++) {
    if (n % primes[i] == 0) return false;
  }
  return true;
}
void firstnprimes(int n, vector<int>& primes) {
  int c = 0;
  primes.push_back(2);
  primes.push_back(3);
  c = 2;
  int nextpossibleprime = 5;
  while (nextpossibleprime <= n) {
    if (isPrime(nextpossibleprime, primes)) {
      primes.push_back(nextpossibleprime);
      c++;
    }
    nextpossibleprime += 2;
  }
}
bool check(int n) {
  for (int i = 0; i < primes.size() - 1; i++) {
    if (primes[i] + primes[i + 1] + 1 > n) return false;
    if (primes[i] + primes[i + 1] + 1 == n) {
      return true;
    }
  }
  return false;
}
int main() {
  int n, k;
  cin >> n >> k;
  if (k >= n)
    cout << "NO" << endl;
  else if (k == 0)
    cout << "YES" << endl;
  else {
    firstnprimes(n, primes);
    int c;
    c = 0;
    for (int i = 0; i < primes.size(); i++) {
      if (check(primes[i])) c++;
      if (c >= k) break;
    }
    if (c >= k)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
