// #pragma GCC target("avx2")
// #pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
// #include <atcoder/all>
// #include <boost/multiprecision/cpp_int.hpp>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define all(a) a.begin(), a.end()
#define sz(x) x.size()
#define yn(p) cout << (p?"Yes":"No") << ENDL;
using namespace std;
// using namespace atcoder;
using ll = long long;
// using lll = boost::multiprecision::cpp_int;
using P = pair<int, int>;
#define ENDL "\n";;

void solve() {
  ll n;
  cin >> n;
  vector<int> a(11), b(11);
  for (int i = 1; i <= 11; ++i) {
    a[i - 1] = (n - i);
    b[i - 1] = i;
  }
  // rep (i, 11) cout << a[i] << " ";
  // rep (i, 11) cout << b[i] << " ";
  ll ans = 1;
  rep(i, 11) {
    ans *= a[i];
    rep(j, 11) {
      if (b[j] == 0) {
        continue;
      }
      if (ans % b[j] == 0) {
        ans /= b[j];
        b[j] = 0;
      }
    }
  }
  cout << ans << endl;
}

int main() {
  std::cin.tie(nullptr);
  std::ios_base::sync_with_stdio(false);
  std::cout << std::fixed << std::setprecision(15);
  solve();
  return 0;
}
#include <bits/stdc++.h>
using namespace std;
int _ = (cout << fixed << setprecision(9), cin.tie(0), ios::sync_with_stdio(0));
using Int = long long;
bool f(const string &s) {
    for (int i = 0; i < s.size(); i++) {
        if (s[i] != s[s.size() - 1 - i]) {
            return false;
        }
    }
    return true;
}
int main() {
    string N; cin >> N;
    reverse(begin(N), end(N));
    for (int i = 0; i < 10; i++) {
        if (f(N)) {
            cout << "Yes\n";
            return 0;
        }
        N.push_back('0');
    }
    cout << "No\n";
    return 0;
}
