#include <bits/stdc++.h>
using namespace std;
const int maxs = 1001;
vector<char> isPrime(maxs, true);
vector<int> v;
void Sieve(int N) {
  isPrime[0] = false;
  isPrime[1] = false;
  int n = sqrt(N);
  for (int i = 4; i <= N; i = i + 2) isPrime[i] = false;
  for (int i = 3; i <= n; i = i + 2) {
    for (int j = i * i; j < N; j += 2 * i) {
      isPrime[j] = false;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, c, k, temp;
  cin >> n >> k;
  c = 0;
  Sieve(n);
  v.push_back(2);
  for (int i = 3; i <= n; i += 2) {
    if (isPrime[i]) v.push_back(i);
  }
  for (int i = 0; i < v.size() - 1; i++) {
    if (c >= k) {
      cout << "YES";
      return 0;
    }
    temp = v[i] + v[i + 1] + 1;
    if (isPrime[temp] && temp <= n) c++;
    if (temp > n) break;
  }
  if (c >= k)
    cout << "YES";
  else
    cout << "NO";
}
