#include <bits/stdc++.h>
using namespace std;
const int N = 1000 + 9, M = 1073741824;
vector<bool> is_prime(N + 1, true);
vector<int> sieve(int n) {
  vector<int> prime;
  for (int i = 2; i <= n; ++i) {
    if (!is_prime[i]) {
      continue;
    } else {
      prime.push_back(i);
      for (int j = 2; i * j <= n; ++j) {
        is_prime[i * j] = 0;
      }
    }
  }
  return prime;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  int n, k;
  cin >> n >> k;
  vector<int> prime = sieve(n);
  int cnt = 0;
  for (int i = 0; i < (int)prime.size() - 1; ++i) {
    int num = prime[i] + prime[i + 1] + 1;
    if (num <= n && is_prime[num]) {
      ++cnt;
    }
    if (cnt == k) break;
  }
  (cnt == k) ? puts("YES") : puts("NO");
  return 0;
}
