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;
inline long long gcd(long long x, long long y) { return x ? gcd(y % x, x) : y; }
const long long mod = 1e9 + 7;
inline long long QPow(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return ans;
}
const long long maxn = 5e5 + 5;
vector<long long> divisor;
vector<long long> prim_divisor;
bool vis[maxn];
long long prim[maxn];
long long top = 0;
void init() {
  top = 0;
  vis[0] = vis[1] = 1;
  for (long long i = 2; i < maxn; i++) {
    if (!vis[i]) prim[top++] = i;
    for (long long j = 0; j < top && (long long)i * prim[j] < maxn; j++) {
      vis[i * prim[j]] = 1;
      if (i % prim[j] == 0) break;
    }
  }
}
long long exgcd(long long a, long long b, long long &x, long long &y) {
  long long d = a;
  if (b == 0)
    x = 1, y = 0;
  else {
    d = exgcd(b, a % b, y, x), y -= a / b * x;
  }
  return d;
}
signed main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long t, m, n;
  init();
  cin >> n;
  long long sq = sqrt(n);
  for (long long i = 1; i <= sq; i++) {
    if (n % i == 0) {
      divisor.push_back(i), divisor.push_back(n / i);
      if (!vis[i]) prim_divisor.push_back(i);
    }
  }
  long long tmpn = n;
  for (long long i = 0; i < prim_divisor.size(); i++)
    while (tmpn % prim_divisor[i] == 0) tmpn /= prim_divisor[i];
  if (tmpn != 1) prim_divisor.push_back(tmpn);
  if (prim_divisor.size() <= 1) {
  } else {
    for (long long i = 0; i < prim_divisor.size(); i++) {
      for (long long j = i + 1; j < prim_divisor.size(); j++) {
        long long x = 0, y = 0;
        long long a = prim_divisor[i], b = prim_divisor[j], c = n - 1;
        long long d = exgcd(a, b, x, y);
        x *= c / d, y *= c / d;
        long long p = b / d, q = a / d, k;
        if (x < 0)
          k = ceil((1.0 - x) / p), x += p * k, y -= q * k;
        else if (x >= 0)
          k = (x - 1) / p, x -= p * k, y += q * k;
        if (y > 0) {
          long long a1 = a * x, a2 = b * y, d1 = n, d2 = n;
          long long g1 = gcd(a1, d1);
          long long g2 = gcd(a2, d2);
          cout << "YES\n2\n";
          cout << a1 / g1 << ' ' << d1 / g1 << endl;
          cout << a2 / g2 << ' ' << d2 / g2 << endl;
          return 0;
        } else {
        }
      }
    }
  }
  cout << "NO\n";
  return 0;
}