#include <bits/stdc++.h>
using namespace std;
const int N = 1005, M = 1005;
bool is[N];
int prm[M];
int getprm(int n) {
  int i, j, k = 0;
  int s, e = (int)(sqrt(0.0 + n) + 1);
  memset(is, 1, sizeof(is));
  prm[k++] = 2;
  is[0] = is[1] = 0;
  for (i = 4; i < n; i += 2) is[i] = 0;
  for (i = 3; i < e; i += 2)
    if (is[i]) {
      prm[k++] = i;
      for (s = i * 2, j = i * i; j < n; j += s) is[j] = 0;
    }
  for (; i < n; i += 2)
    if (is[i]) prm[k++] = i;
  return k;
}
bool isok(int t) {
  for (int i = 2; i < t; ++i) {
    if (i < t - i && is[i] && is[t - i]) {
      bool sign = true;
      for (int k = i + 1; k < t - i; ++k) {
        if (is[k]) {
          sign = false;
          break;
        }
      }
      if (sign) {
        return true;
      }
    }
  }
  return false;
}
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  getprm(n + 1);
  int t = 0;
  for (int i = 2; i <= n; ++i) {
    if (is[i] && isok(i - 1)) {
      t++;
    }
    if (t >= k) {
      break;
    }
  }
  if (t >= k)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
