#include <bits/stdc++.h>
using namespace std;
const int inf = INT_MAX;
const int N = 2e6 + 10;
const unsigned long long strmod = 212370440130137957ll;
const unsigned long long strp = 1e9 + 9;
using namespace std;
long long read() {
  char ch = getchar();
  long long x = 0, f = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while ('0' <= ch && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int p[3010], tot;
bool v[1010];
void prime() {
  v[1] = v[0] = 1;
  for (int i = 2; i <= 1000; i++) {
    if (!v[i]) p[++tot] = i;
    for (int j = 1; j <= tot && i * p[j] <= 1000; j++) {
      v[i * p[j]] = 1;
      if (i % p[j] == 0) break;
    }
  }
}
int s[3010] = {0};
bool vis[3030] = {0};
int cnt[1010] = {0};
int main() {
  prime();
  int n, k;
  for (int i = 1; i < tot; i++)
    vis[p[i] + p[i + 1] + 1] = !v[p[i] + p[i + 1] + 1];
  for (int i = 1; i <= 1000; i++) cnt[i] = cnt[i - 1] + vis[i];
  while (cin >> n >> k) {
    if (cnt[n] >= k)
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
