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;
const int MOD = 1e9 + 7;
string to_string(string s) { return '"' + s + '"'; }
string to_string(char s) { return string(1, s); }
string to_string(const char *s) { return to_string((string)s); }
string to_string(bool b) { return (b ? "true" : "false"); }
template <typename A>
string to_string(A);
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A>
string to_string(A v) {
  bool f = 1;
  string r = "{";
  for (const auto &x : v) {
    if (!f) r += ", ";
    f = 0;
    r += to_string(x);
  }
  return r + "}";
}
void debug_out() { cout << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cout << " " << to_string(H);
  debug_out(T...);
}
inline long long add(long long a, long long b) {
  a += b;
  if (a >= MOD) a -= MOD;
  return a;
}
inline long long sub(long long a, long long b) {
  a -= b;
  if (a < 0) a += MOD;
  return a;
}
inline long long mul(long long a, long long b) {
  return (long long)((long long)a * b % MOD);
}
inline long long binpow(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = mul(res, a);
    a = mul(a, a);
    b /= 2;
  }
  return res;
}
inline long long inv(long long a) { return binpow(a, MOD - 2); }
long long gcd(long long a, long long b, long long &x, long long &y) {
  if (a == 0) {
    x = 0, y = 1;
    return b;
  }
  long long x1, y1;
  long long d = gcd(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return d;
}
void findPositiveSolution(long long a, long long b, long long n) {
  long long x, y;
  long long d = gcd(a, b, x, y);
  assert(1ll * a * x + 1ll * b * y == d);
  if (x <= 0) {
    swap(x, y);
    swap(a, b);
  }
  x *= n / d;
  y *= n / d;
  long long k = (-y + a - 1) / a;
  x -= k * b;
  y += k * a;
  assert(x > 0 && y > 0 && 1ll * a * x + 1ll * b * y == n);
  cout << "YES\n2\n";
  cout << x << " " << (n + 1) / a << "\n";
  cout << y << " " << (n + 1) / b << "\n";
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  vector<long long> prime;
  long long m = n;
  for (long long i = 2; 1ll * i * i <= n; ++i)
    if (m % i == 0) {
      while (m % i == 0) m /= i;
      prime.push_back(i);
    }
  if (m > 1) prime.push_back(m);
  if (prime.size() == 1) {
    cout << "NO\n";
    return 0;
  }
  findPositiveSolution(prime[0], prime[1], n - 1);
  return 0;
}