#include <bits/stdc++.h>
using namespace std;
int p[1005];
bool isp[1005];
int main() {
  memset(isp, 1, sizeof(isp));
  isp[0] = isp[1] = 0;
  for (int i = 2; i <= 1000; i++)
    if (isp[i])
      for (int j = i + i; j <= 1000; j += i) isp[j] = 0;
  int pre = 2;
  for (int i = 3; i <= 1000; i++)
    if (isp[i]) {
      if (isp[1 + pre + i]) p[1 + pre + i] = 1;
      pre = i;
    }
  for (int i = 1; i <= 1000; i++) p[i] += p[i - 1];
  int n, k;
  while (scanf("%d%d", &n, &k) == 2) {
    if (p[n] >= k)
      puts("YES");
    else
      puts("NO");
  }
}
