#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long double EPS = 1e-8;
int gcd(int a, int b) {
  if (a < b) swap(a, b);
  if (b == 0) return a;
  return gcd(b, a % b);
}
int s(long long x) {
  int ans = 0;
  for (ans = 0; x; ans += x % 10, x /= 10)
    ;
  return ans;
}
long long f(long long x) { return x * x + s(x) * x; }
int main(int argc, char* argv[]) {
  int n, k;
  cin >> n >> k;
  vector<bool> prime(n + 1, true);
  vector<int> p;
  for (int i = 2; i <= n; i++)
    if (prime[i]) {
      p.push_back(i);
      for (int j = i * i; j <= n; j += i) prime[j] = false;
    };
  int count = 0;
  for (int i = 0; i < p.size(); i++) {
    for (int j = 0; j + 1 < p.size(); j++)
      if (p[j] + p[j + 1] + 1 == p[i]) {
        count++;
        break;
      }
  }
  if (count >= k)
    cout << "YES";
  else
    cout << "NO";
  cout << endl;
  return 0;
}
