#include <bits/stdc++.h>
int main() {
  int a, b, i, j, k, arr[100000], m = 0, n = 0, s = 0, e;
  scanf("%d %d", &a, &b);
  for (i = 2; i <= a; i++) {
    n = 0;
    for (j = 2; j <= i / 2; j++) {
      if (i % j == 0) {
        n = 1;
        break;
      }
    }
    if (n == 0) {
      arr[m] = i;
      m++;
    }
  }
  for (i = 0; i <= m; i++)
    for (j = 0; j <= i; j++)
      if (arr[j] + arr[j + 1] + 1 == arr[i]) s++;
  if ((s + 1) >= b)
    printf("YES\n");
  else
    printf("NO\n");
}
