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;
int II;
long long I_O;
char CC, SS[20];
const int N = 1e5 + 4;
inline long long read() {
  II = 1, I_O = 0;
  while (!isdigit(CC = getchar()))
    if (CC == '-') II = -1;
  while (isdigit(CC)) I_O = I_O * 10 + CC - '0', CC = getchar();
  return I_O * II;
}
inline void wonl() { putchar('\n'); }
inline void wws() {}
inline void dbg() { cout << endl; }
inline void ww(long long k) {
  if (k < 0) putchar('-'), k *= -1;
  II = 0;
  while (k) SS[++II] = k % 10, k /= 10;
  if (!II) SS[++II] = 0;
  while (II) putchar(SS[II--] + '0');
}
inline void ww(pair<long long, long long> p) {
  ww(p.first), putchar(' '), ww(p.second);
}
template <typename T, typename... V>
inline void wonl(T t, V... v) {
  ww(t);
  if (sizeof...(v)) putchar(' ');
  wonl(v...);
}
template <typename T, typename... V>
inline void wws(T t, V... v) {
  ww(t);
  putchar(' ');
  wws(v...);
}
template <typename T, typename... V>
inline void dbg(T t, V... v) {
  cout << ' ' << t;
  dbg(v...);
}
vector<int> v;
void primeFactors(long long n) {
  int cnt = 0;
  while (n % 2 == 0) {
    n = n / 2;
    cnt++;
  }
  if (cnt > 0) v.push_back(2);
  for (int i = 3; i <= sqrt(n); i = i + 2) {
    cnt = 0;
    while (n % i == 0) {
      cnt++;
      n = n / i;
    }
    if (cnt > 0) v.push_back(i);
  }
  if (n > 2) v.push_back(n);
}
long long gcd(long long a, long long b, long long& x, long long& y) {
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  }
  long long x1, y1;
  long long d = gcd(b, a % b, x1, y1);
  x = y1;
  y = x1 - y1 * (a / b);
  return d;
}
void solve() {
  int n = read();
  primeFactors(n);
  sort(v.begin(), v.end());
  if (v.size() && v.back() == n) v.pop_back();
  if (v.size() <= 1) {
    printf("NO\n");
    return;
  }
  long long a = v[0];
  long long b = v[1];
  long long c = n - 1;
  long long xg, yg;
  long long g = gcd(a, b, xg, yg);
  long long x0 = xg * c;
  long long y0 = yg * c;
  long long up = y0 / a;
  long long down = ((-x0) / b);
  for (long long k = up - 2; k <= up + 2; k++) {
    long long x = x0 + k * b;
    long long y = y0 - k * a;
    if (x >= 0 && y >= 0) {
      printf("YES\n");
      wonl(2);
      wonl(x, n / a);
      wonl(y, n / b);
      return;
    }
  }
  for (long long k = down - 2; k <= down + 2; k++) {
    long long x = x0 + k * b;
    long long y = y0 - k * a;
    if (x >= 0 && y >= 0) {
      printf("YES\n");
      wonl(2);
      wonl(x, n / a);
      wonl(y, n / b);
      return;
    }
  }
  printf("NO\n");
}
int main() {
  solve();
  return 0;
}