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 inf = 1e9 + 7;
string to_string(char s) { return string(1, s); }
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"); }
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 (auto it = v.begin(); it != v.end(); ++it) {
    if (!f) r += ", ";
    f = 0;
    r += to_string(*it);
  }
  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...);
}
int extended_euclid(int a, int b, int &x, int &y) {
  int xx = y = 0;
  int yy = x = 1;
  while (b) {
    int q = a / b;
    int t = b;
    b = a % b;
    a = t;
    t = xx;
    xx = x - q * xx;
    x = t;
    t = yy;
    yy = y - q * yy;
    y = t;
  }
  return a;
}
long long extended_euclidean(long long a, long long b, long long &x,
                             long long &y) {
  long long xx, yy, q, t;
  x = yy = 1, xx = y = 0;
  while (b != 0) {
    q = a / b, t = b, b = a % b, a = t;
    t = xx, xx = x - q * xx, x = t;
    t = yy, yy = y - q * yy, y = t;
  }
  return a;
}
bool lde_solver(long long a, long long b, long long c, long long &x,
                long long &y, long long &g) {
  g = extended_euclidean(a, b, x, y);
  if (c % g != 0) return false;
  x *= c / g, y *= c / g;
  return true;
}
bool non_negative_lde(long long a, long long b, long long c, long long &x,
                      long long &y, long long &g) {
  if (not lde_solver(a, b, c, x, y, g)) return false;
  if (x < 0 or y < 0) {
    long long dx = b / g, dy = a / g, steps;
    if (x < 0) steps = (-x + dx - 1) / dx;
    if (y < 0) steps = -(-y + dy - 1) / dy;
    x += steps * dx, y -= steps * dy;
    if (x < 0 or y < 0) return false;
  }
  return true;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  for (auto i = (2); i <= (min(n - 1, 100000LL)); ++i)
    if (n % i == 0) {
      long long a = 1, b = n;
      while (b % i == 0) b /= i, a *= i;
      if (b == 1) {
        cout << "NO\n";
        return 0;
      }
      long long x, y, g;
      assert(non_negative_lde(a, b, n - 1, x, y, g));
      cout << "YES\n";
      cout << "2\n";
      assert(x < b and y < a);
      cout << x << " " << b << "\n";
      cout << y << " " << a << "\n";
      return 0;
    }
  cout << "NO\n";
  return 0;
}