#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000;
int prime[maxn];
int is_prime(int x) {
  if (x == 2) return 1;
  if (x == 1 || x % 2 == 0) return 0;
  for (int i = 3; i * i <= x; i++) {
    if (x % i == 0) return 0;
  }
  return 1;
}
int main() {
  int n, k, l = 0;
  for (int i = 1; i <= maxn; i++) {
    if (is_prime(i)) prime[i] = 1;
  }
  while (scanf("%d%d", &n, &k) != EOF) {
    if (k == 0)
      printf("YES\n");
    else {
      int f = 0, cnt = 0;
      for (int i = 1; i <= n && !f; i++) {
        if (prime[i]) {
          int sum = i - 1;
          int haf = sum / 2;
          while (haf >= 1) {
            if (prime[haf]) break;
            haf--;
          }
          int j = haf;
          haf++;
          while (haf <= sum && haf > j && prime[j]) {
            if (prime[haf]) break;
            haf++;
          }
          if (j + haf == sum && prime[j] && prime[haf]) cnt++;
          if (cnt == k) {
            f = 1;
            break;
          }
        }
      }
      printf("%s\n", !f ? "NO" : "YES");
    }
  }
  return 0;
}
