#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, flag = 0;
  cin >> a;
  for (int i = 1; i <= 9; i++) {
    for (int j = 1; j <= 9; j++) {
      if (i * j == a) {
        flag = 1;
        break;
      }
    }
  }
  if (flag == 1)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
