#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a == 0)
    return b;
  else
    return gcd(b % a, a);
}
long long findGCD(vector<long long> arr, long long n) {
  long long result = arr[0];
  for (long long i = 1; i < n; i++) result = gcd(arr[i], result);
  return result;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.precision(8);
  cout << fixed;
  long long a;
  cin >> a;
  bool flag = false;
  for (long long i = 1; i <= 9; i++) {
    for (long long j = 1; j <= 9; j++) {
      if ((i * j) == a) {
        flag = true;
        break;
      }
    }
    if (flag) {
      break;
    }
  }
  if (flag)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
