#include <bits/stdc++.h>
using namespace std;
vector<char> prime(3000, true);
vector<int> seive(int n) {
  vector<int> ret;
  prime[0] = prime[1] = false;
  for (int i = 2; i <= n; i++) {
    if (prime[i]) ret.push_back(i);
    for (int j = i * i; j <= n; j += i) prime[j] = false;
  }
  return ret;
}
int main() {
  int n, k;
  cin >> n >> k;
  int t = 0;
  vector<int> p = seive(n);
  for (int i = 0; i < p.size(); i++) {
    int target = p[i];
    int sum = -1;
    for (int j = 0; j < i; j++) {
      sum = p[j] + p[j + 1] + 1;
      if (sum >= target) break;
    }
    if (sum == target) t++;
  }
  if (t >= k)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
