Problem: You are given a positive integer n.

Find a sequence of fractions (a_i)/(b_i), i = 1 … k (where a_i and b_i are positive integers) for some k such that:

$$$ \begin{cases} $b_i$ divides $n$, $1 < b_i < n$ for $i = 1 … k$ \\\ $1 ≤ a_i < b_i$ for $i = 1 … k$ \\\ \text{$∑_{i=1}^k (a_i)/(b_i) = 1 - 1/n$} \end{cases} $$$

Input

The input consists of a single integer n (2 ≤ n ≤ 10^9).

Output

In the first line print "YES" if there exists such a sequence of fractions or "NO" otherwise.

If there exists such a sequence, next lines should contain a description of the sequence in the following format.

The second line should contain integer k (1 ≤ k ≤ 100 000) — the number of elements in the sequence. It is guaranteed that if such a sequence exists, then there exists a sequence of length at most 100 000.

Next k lines should contain fractions of the sequence with two integers a_i and b_i on each line.

Examples

Input


2


Output


NO


Input


6


Output


YES
2
1 2
1 3

Note

In the second example there is a sequence 1/2, 1/3 such that 1/2 + 1/3 = 1 - 1/6.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
string to_string(string s) { return '"' + s + '"'; }
string to_string(const char* s) { return to_string((string)s); }
string to_string(bool b) { return (b ? "true" : "false"); }
string to_string(char ch) { return string("'") + ch + string("'"); }
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <class InputIterator>
string to_string(InputIterator first, InputIterator last) {
  bool start = true;
  string res = "{";
  while (first != last) {
    if (!start) {
      res += ", ";
    }
    start = false;
    res += to_string(*first);
    ++first;
  }
  res += "}";
  return res;
}
template <typename A>
string to_string(A v) {
  bool first = true;
  string res = "{";
  for (const auto& x : v) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}
void debug_out() { cerr << '\n'; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
template <typename A, typename B>
istream& operator>>(istream& input, pair<A, B>& x) {
  input >> x.first >> x.second;
  return input;
}
template <typename A>
istream& operator>>(istream& input, vector<A>& x) {
  for (auto& i : x) input >> i;
  return input;
}
long long euclid(long long a, long long b, long long& x, long long& y) {
  if (b) {
    long long d = euclid(b, a % b, y, x);
    return y -= a / b * x, d;
  }
  return x = 1, y = 0, a;
}
long long expo(long long a, long long n, long long mod) {
  long long ans = 1;
  while (n) {
    if (n & 1) {
      ans = (ans * a) % mod;
      n--;
    } else {
      a = (a * a) % mod;
      n /= 2;
    }
  }
  return ans;
}
void solve() {
  long long n;
  cin >> n;
  long long num = n;
  map<long long, long long> m;
  for (long long i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      m[i]++;
      n /= i;
    }
  }
  if (n > 1) m[n]++;
  if ((long long)m.size() == 1) {
    cout << "NO\n";
  } else {
    cout << "YES\n";
    vector<pair<long long, long long> > z((m).begin(), (m).end());
    long long num1 =
        expo(z[0].first, z[0].second, 1LL * 1000000007 * 1000000007);
    long long num2 =
        expo(z[1].first, z[1].second, 1LL * 1000000007 * 1000000007);
    long long x, y;
    long long g = euclid(num1, num2, x, y);
    x *= num - 1;
    y *= num - 1;
    if (x >= 0) {
      long long times_sub = x / num2;
      x -= times_sub * num2;
      y += times_sub * num1;
    }
    if (y >= 0) {
      long long times_sub = y / num1;
      y -= num1 * times_sub;
      x += num2 * times_sub;
    }
    cout << 2 << '\n';
    cout << x << " " << (num / num1) << '\n';
    cout << y << " " << (num / num2) << '\n';
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}