#include <bits/stdc++.h>
using namespace std;
int primes[10001];
int p[10001];
int numbers[10001];
int cnt;
void sieve() {
  for (int a = 2; a <= 10000; ++a)
    if (primes[a] == 0)
      for (int b = 2; b * a <= 10000; b++) primes[a * b] = 1;
  int c = 0;
  for (int a = 2; a <= 10001; ++a)
    if (primes[a] == 0) {
      p[c] = a;
      c++;
    }
  cnt = 0;
  for (int a = 1; a < c; ++a) {
    if (primes[p[a] + p[a - 1] + 1] == 0) {
      numbers[cnt] = p[a] + p[a - 1] + 1;
      cnt++;
    }
  }
}
int main() {
  sieve();
  int n, k;
  cin >> n >> k;
  if (lower_bound(numbers, numbers + cnt, n) - numbers >= k - 1)
    cout << "YES";
  else
    cout << "NO";
}
