#include <bits/stdc++.h>
int main() {
  int N;
  int A;
  int B;
  scanf("%d", &N);
  for (int A = 1; A < 10; A++)
    for (int B = 1; B < 10; B++) {
      if (A * B == N) {
        printf("YES\n");
        return 0;
      }
    }
  printf("NO\n");
}
