#include <bits/stdc++.h>
using namespace std;
bool isPrime(int n) {
  for (int i = 2; i < n; i++) {
    if (n % i == 0) return 0;
  }
  return 1;
}
int primes[1005], c;
bool plist[1005];
bool nlist[1005];
int main() {
  int i;
  primes[c++] = 2;
  for (i = 3; i < 1000; i++) {
    if (isPrime(i)) {
      primes[c++] = i;
    }
  }
  for (i = 0; i < c; i++) {
    plist[primes[i]] = true;
  }
  int n, k, q = 0;
  cin >> n >> k;
  q = 1 + primes[0] + primes[1];
  nlist[q] = true;
  int j = 0;
  for (i = 2; i < c; i++) {
    q = q - primes[j] + primes[i];
    if (q > n) break;
    nlist[q] = true;
    j++;
  }
  int y = 0;
  for (i = 2; i <= n; i++) {
    if (plist[i] && nlist[i]) {
      y++;
    }
  }
  if (y >= k)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
