#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i;
  cin >> n;
  while (n % 2 == 0) n = n / 2;
  for (i = 3; i <= sqrt(n); i = i + 2) {
    while (n % i == 0) {
      n = n / i;
    }
  }
  if (i >= 1 && i <= 9)
    cout << "Yes";
  else
    cout << "No";
}
