#include <bits/stdc++.h>
using namespace std;
bool arr[2001];
int main() {
  int n, k, ans = 0;
  cin >> n >> k;
  if (!k) {
    cout << "YES" << endl;
    return 0;
  }
  for (int i = 2; i * i <= n; i++) {
    if (arr[i]) continue;
    for (int j = i; j * i <= n; j++) {
      arr[i * j] = true;
    }
  }
  vector<int> v;
  for (int i = 2; i <= n; i++) {
    if (!arr[i]) v.push_back(i);
  }
  int sz = v.size();
  for (int i = 0; i < sz - 2; i++) {
    if (!arr[v[i] + v[i + 1] + 1] && v[i] + v[i + 1] + 1 <= n) {
      ans++;
    }
  }
  if (ans >= k)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
