#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, count = 0, flag = 1;
  cin >> n >> k;
  vector<int> v(n + 1);
  vector<int> v2;
  for (int i = 0; i <= n; ++i) {
    v[i] = 1;
  }
  for (int i = 2; i * i <= n; ++i) {
    if (v[i] == 1) {
      for (int j = i * i; j <= n; j += i) {
        v[j] = 0;
      }
    }
  }
  for (int i = 2; i <= n; ++i) {
    if (v[i] == 1) {
      v2.push_back(i);
    }
  }
  if (k == 0) {
    cout << "YES" << endl;
    return 0;
  }
  int i = 0;
  for (i = 0; i + 1 < v2.size(); ++i) {
    if (find(v2.begin(), v2.end(), v2[i] + v2[i + 1] + 1) != v2.end()) {
      ++count;
      if (count == k) {
        break;
      }
    }
  }
  if (count == k) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
