#include <bits/stdc++.h>
using namespace std;
vector<vector<long long> > ans;
long long flag[46656 >> 6];
long long cnt = 0;
vector<long long> primes;
void sieve(long long n) {
  int i, j, k;
  primes.push_back(2), cnt = 1;
  for (i = 3; i < sqrt(n); i += 2)
    if (!(flag[i >> 6] & (1 << ((i >> 1) & 31))))
      for (j = i * i, k = i << 1; j < n; j += k)
        (flag[j >> 6] |= (1 << ((j >> 1) & 31)));
  for (i = 3; i < n; i += 2)
    if (!(flag[i >> 6] & (1 << ((i >> 1) & 31)))) primes.push_back(i);
}
int main() {
  ios_base::sync_with_stdio(0);
  long long n, k;
  cin >> n >> k;
  sieve(n + 1);
  long long count = 0;
  for (long long int i = 0; i < primes.size() - 1; i++) {
    long long a = primes[i] + primes[i + 1];
    if (binary_search((primes).begin(), (primes).end(), a + 1)) {
      count++;
    }
  }
  if (count >= k) {
    cout << "YES";
    return 0;
  }
  cout << "NO";
  return 0;
}
