#include <bits/stdc++.h>
using namespace std;
int arr[100001];
long long int gcd(int a, int b) { return (b == 0 ? a : gcd(b, a % b)); }
long long int mod = 1000000007;
int lcm(int a, int b) { return ((a * b) / gcd(a, b)); }
long long int pw(long long int b, long long int p) {
  if (!p) return 1;
  long long int sq = pw(b, p / 2);
  sq = (sq * sq) % mod;
  if (p % 2) sq = (sq * b) % mod;
  return sq;
}
long long int _sieve_size;
bitset<10000010> bs;
vector<int> primes;
void sieve(long long int upperbound) {
  _sieve_size = upperbound + 1;
  bs.set();
  bs[0] = bs[1] = 0;
  for (long long int i = 2; i <= _sieve_size; i++)
    if (bs[i]) {
      for (long long int j = i * i; j <= _sieve_size; j += i) bs[j] = 0;
      primes.push_back((int)i);
    }
}
long long int num;
long long int cnt;
string a[2], b[2];
map<int, int> mp;
int main() {
  int n, m;
  cin >> n >> m;
  sieve(n);
  vector<int> ok;
  for (int i = 1; i < primes.size(); i++) {
    if (bs[primes[i] + primes[i - 1] + 1] && primes[i] + primes[i - 1] + 1 <= n)
      ok.push_back(primes[i] + primes[i - 1] + 1);
  }
  if (ok.size() >= m)
    cout << "YES";
  else
    cout << "NO";
  ;
}
