#include <bits/stdc++.h>
#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
using namespace std;
 
 
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
 
int main() {
  
  int A;
  cin >> A;
  if (A<=9||(A<=18&&A%2==0)||(A<=27&&A%3==0)||(A<=36&&A%4==0)||(A<=45&&A%5==0)||(A<=54&&A%6==0)||(A<=63&&A%7==0)||(A<=72&&A%8==0)||(A<=81&&A%9==0)){
    cout << "Yes" << endl;
  }
  else { 
  	cout << "No" << endl;
}
#include <bits/stdc++.h>
#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
using namespace std;
 
 
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
 
int main() {
  
  int A;
  cin >> A;
  if (A<=9||(A<=18&&A%2==0)||(A<=27&&A%3==0)||(A<=36&&A%4==0)||(A<=45&&A%5==0)||(A<=54&&A%6==0)||(A<=63&&A%7==0)||(A<=72&&A%8==0)||(A<=81&&A%9==0)){
    cout << "Yes" << endl;
  }
  else { 
  	cout << "No" << endl;
  }
}