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 rd() {
  register long long res = 0, lab = 1;
  register char ch = getchar();
  while ((ch < '0' || ch > '9') && ch != EOF) {
    if (ch == '-') lab = -lab;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9')
    res = (res << 3) + (res << 1) + (ch & 15), ch = getchar();
  return res * lab;
}
inline double rdf() {
  double res = 0, g = 1;
  int lab = 1;
  char ch = getchar();
  while ((ch < '0' || ch > '9') && ch != EOF)
    lab = lab ^ (ch == '-'), ch = getchar();
  while (ch >= '0' && ch <= '9') res = res * 10 + (ch & 15), ch = getchar();
  if (ch == '.') {
    ch = getchar();
    while (ch >= '0' && ch <= '9')
      g *= 0.1, res += g * (ch & 15), ch = getchar();
  }
  return lab ? res : -res;
}
inline void prt(long long x, char t = '\n') {
  static char ch[70];
  int tp = 0;
  if (!x) {
    fputs("0", stdout);
    if (t) putchar(t);
    return;
  }
  if (x < 0) putchar('-'), x = -x;
  while (x) ch[++tp] = (x % 10) ^ 48, x /= 10;
  while (tp) putchar(ch[tp--]);
  if (t) putchar(t);
}
inline long long tomax(long long& a, long long b) {
  return a > b ? a : (a = b);
}
inline long long tomin(long long& a, long long b) {
  return a < b ? a : (a = b);
}
inline long long umax(long long a, long long b) { return a > b ? a : b; }
inline long long umin(long long a, long long b) { return a < b ? a : b; }
inline long long uabs(long long x) { return x > 0 ? x : -x; }
inline long long sqr(long long x) { return x * x; }
inline long long qpow(long long n, long long e = 1000000007 - 2,
                      long long p = 1000000007) {
  n %= p;
  register long long res = 1;
  while (e) {
    if (e & 1) res = res * n % p;
    n = n * n % p;
    e >>= 1;
  }
  return res;
}
const long long ir = 1000000007 - 1;
struct cpx {
  int r, i;
  cpx(long long a = 0, long long b = 0)
      : r(a % 1000000007), i(b % 1000000007) {}
  cpx operator+(const cpx& _) const { return cpx(r + _.r, i + _.i); }
  cpx operator-(const cpx& _) const {
    return cpx(r - _.r + 1000000007, i - _.i + 1000000007);
  }
  cpx operator*(const cpx& _) const {
    return cpx((1ll * r * _.r + ir * i * _.i) % 1000000007,
               (1ll * r * _.i + 1ll * i * _.r) % 1000000007);
  }
};
inline cpx qpow(cpx n, long long e) {
  register cpx res(1);
  while (e) {
    if (e & 1) res = res * n;
    n = n * n;
    e >>= 1;
  }
  return res;
}
long long n, fac[100005], t;
long long exgcd(long long a, long long b, long long& x, long long& y) {
  long long gcd = a;
  if (!b)
    x = 1, y = 0;
  else
    gcd = exgcd(b, a % b, y, x), y -= a / b * x;
  return gcd;
}
int main() {
  n = rd();
  long long tmp = n;
  for (int i = 2; i * i <= n; ++i) {
    if (!(tmp % i)) {
      fac[++t] = i;
      while (!(tmp % i)) tmp /= i;
    }
  }
  if (tmp - 1) fac[++t] = tmp;
  if (t <= 1) return puts("NO"), 0;
  sort(fac + 1, fac + 1 + t);
  long long a = fac[1], b = fac[2], c = n - 1, x, y, d = exgcd(a, b, x, y);
  assert(d == 1);
  if (c % d) return puts("NO"), 0;
  x *= c, y *= c;
  puts("YES\n2");
  x = (x % b + b) % b, y = (c - x * a) / b;
  prt(y, ' ');
  prt(n / b);
  prt(x, ' ');
  prt(n / a);
  return 0;
}