#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
int d() {
  int ret;
  scanf("%d", &ret);
  return ret;
}
long long lld() {
  long long ret;
  scanf("%lld", &ret);
  return ret;
}
long long mod(long long a, long long b) { return ((a % b + b) % b); }
long long floor(long long a, long long b) { return (a - mod(a, b)) / b; }
vector<long long> getDivisorsN(long long n) {
  vector<long long> ret;
  for (long long i = 1; i <= n; ++i)
    if (n % i == 0) ret.push_back(i);
  return ret;
}
long long getDivisors(long long n) {
  long long cnt = 0;
  long long i;
  for (i = 1; i < n / i; ++i) {
    if (n % i == 0) {
      cnt += 2;
    }
  }
  if (i == n / i && n % i == 0) cnt++;
  return cnt;
}
vector<long long> getMultiples(long long x, long long n) {
  vector<long long> ret;
  for (long long m = x; m <= n; m += x) ret.push_back(m);
  return ret;
}
int prime[N];
int x = 0;
bitset<N> is_prime;
void sieve() {
  is_prime.set();
  is_prime[0] = is_prime[1] = 0;
  for (long long p = 2; p <= N / p; ++p)
    if (is_prime[p]) {
      prime[x++] = p;
      for (long long m = p * p; m < N; m += p) is_prime[m] = 0;
    }
}
vector<pair<long long, long long>> factorize(long long n) {
  vector<pair<long long, long long>> ret;
  for (long long p = 2; p <= n / p; ++p) {
    int e = 0;
    while (n % p == 0) {
      n /= p;
      ++e;
    }
    if (e) ret.push_back({p, e});
  }
  if (n > 1) ret.push_back({n, 1});
  return ret;
}
char arr[N];
int main() {
  int n = d(), k = d(), cnt = 0;
  sieve();
  for (int i = n; i >= 2; i--) {
    if (is_prime[i]) {
      for (int j = 0; j < n; j++) {
        if (prime[j] + prime[j + 1] + 1 == i) {
          cnt++;
          break;
        }
      }
    }
  }
  if (k == cnt || k == 0)
    printf("YES\n");
  else
    printf("NO\n");
}
