#include <bits/stdc++.h>
using namespace std;
long long n, m, k, x;
set<long long> se;
vector<long long> v;
map<long long, long long> mp;
bool bo[1200];
int main() {
  for (int i = 2; i < 1110; i++) {
    if (bo[i]) continue;
    v.push_back(i);
    ;
    for (int j = i * i; j < 1110; j += i) bo[j] = true;
  }
  x = 1;
  for (int i = 1; i < v.size(); i++) {
    k = v[i] + v[i - 1] + 1;
    if (bo[k]) continue;
    se.insert(k);
    mp[k] = x++;
  }
  se.insert(0);
  mp[0] = 0;
  cin >> n >> m;
  n = mp[*(--se.upper_bound(n))];
  if (n >= m)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
