#include <bits/stdc++.h>
using namespace std;
vector<int> vp(1000000, 0);
void siv() {
  int n = 1000000;
  int sq = sqrt(n);
  for (int i = 4; i <= n; i += 2) vp[i] = 1;
  for (int i = 3; i <= sq; i += 2) {
    if (vp[i] == 0) {
      for (int j = i * i; j <= n; j += i) {
        vp[j] = 1;
      }
    }
  }
  vp[1] = 1;
}
int main() {
  siv();
  int n, s = 0;
  scanf("%d", &n);
  ;
  int k;
  scanf("%d", &k);
  ;
  vector<int> v;
  for (int i = 1; i <= n; i++) {
    if (vp[i] == 0) {
      int x = i;
      v.push_back(x);
    }
  }
  int si = v.size();
  for (int i = 1; i < si; i++) {
    int z = v[i] + v[i - 1] + 1;
    if (vp[z] == 0 && z <= n) {
      s++;
    }
  }
  if (s >= k)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
