#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> prime(10001, 0);
int h = 0;
void sieve() {
  int m = sqrt(n), j;
  for (int i = 2; i <= m; i++)
    if (prime[i] == 0) {
      j = i * i;
      while (j <= n) {
        prime[j] = 1;
        j += i;
      }
    }
}
long long td[10001];
void crs() {
  td[0] = 0;
  for (int i = 2; i <= n; i++)
    if (prime[i] == 0) {
      h++;
      td[h] = td[h - 1] + i;
    }
}
int main() {
  int k;
  cin >> n >> k;
  sieve();
  crs();
  int dem = 0;
  for (int i = 1; i <= h - 1; i++) {
    if (n >= td[i + 1] - td[i - 1] + 1 && prime[td[i + 1] - td[i - 1] + 1] == 0)
      dem++;
  }
  if (dem >= k)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
