#include <bits/stdc++.h>
using namespace std;
void sieve(int N, vector<bool>& is_prime, vector<int>& primes) {
  is_prime.resize(N + 1, true);
  for (int i = 2; i <= N; ++i) {
    if (is_prime[i]) {
      for (int j = i * i; j <= N; j += i) {
        is_prime[j] = false;
      }
    }
  }
  for (int i = 2; i <= N; ++i)
    if (is_prime[i]) primes.push_back(i);
}
int main() {
  int N, K;
  cin >> N >> K;
  vector<bool> is_prime;
  vector<int> primes;
  sieve(N, is_prime, primes);
  int tot = 0;
  for (int i = 2; i <= N; ++i) {
    if (is_prime[i]) {
      for (int j = 0; j + 1 < primes.size(); ++j) {
        if (primes[j] + primes[j + 1] + 1 == i) {
          ++tot;
          break;
        } else if (primes[j] + primes[j + 1] + 1 > i) {
          break;
        }
      }
    }
  }
  cout << (tot >= K ? "YES" : "NO") << endl;
}
