#include <bits/stdc++.h>
using namespace std;
vector<int> p;
void sieve(int n, bool isp[]) {
  for (int i = 0; i <= n; i++) isp[i] = true;
  isp[0] = false;
  isp[1] = false;
  for (int i = 2; i * i <= n; i++) {
    if (isp[i]) {
      for (int j = i * i; j <= n; j += i) isp[j] = false;
    }
  }
  for (int i = 0; i <= n; i++) {
    if (isp[i]) p.push_back(i);
  }
}
int main() {
  int n, k;
  cin >> n >> k;
  bool isp[n + 1];
  sieve(n, isp);
  int c = 0;
  for (int i = 0; i < p.size() - 1; i++) {
    if (p[i] + p[i + 1] + 1 <= n && isp[p[i] + p[i + 1] + 1]) c++;
  }
  if (c >= k)
    cout << "YES";
  else
    cout << "NO";
}
