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;
struct bign {
  int len, s[109];
  bign() {
    memset(s, 0, sizeof(s));
    len = 1;
  }
  bign(int num) { *this = num; }
  bign(const char *num) { *this = num; }
  bign operator=(const int num) {
    char s[109];
    sprintf(s, "%d", num);
    *this = s;
    return *this;
  }
  bign operator=(const char *num) {
    for (int i = 0; num[i] == '0'; num++)
      ;
    len = strlen(num);
    for (int i = 0; i < len; i++) s[i] = num[len - i - 1] - '0';
    return *this;
  }
  bign operator+(const bign &b) const {
    bign c;
    c.len = 0;
    for (int i = 0, g = 0; g || i < max(len, b.len); i++) {
      int x = g;
      if (i < len) x += s[i];
      if (i < b.len) x += b.s[i];
      c.s[c.len++] = x % 10;
      g = x / 10;
    }
    return c;
  }
  bign operator+=(const bign &b) {
    *this = *this + b;
    return *this;
  }
  void clean() {
    while (len > 1 && !s[len - 1]) len--;
  }
  bign operator*(const bign &b) {
    bign c;
    c.len = len + b.len;
    for (int i = 0; i < len; i++) {
      for (int j = 0; j < b.len; j++) {
        c.s[i + j] += s[i] * b.s[j];
      }
    }
    for (int i = 0; i < c.len; i++) {
      c.s[i + 1] += c.s[i] / 10;
      c.s[i] %= 10;
    }
    c.clean();
    return c;
  }
  bign operator*=(const bign &b) {
    *this = *this * b;
    return *this;
  }
  bign operator-(const bign &b) {
    bign c;
    c.len = 0;
    for (int i = 0, g = 0; i < len; i++) {
      int x = s[i] - g;
      if (i < b.len) x -= b.s[i];
      if (x >= 0)
        g = 0;
      else {
        g = 1;
        x += 10;
      }
      c.s[c.len++] = x;
    }
    c.clean();
    return c;
  }
  bign operator-=(const bign &b) {
    *this = *this - b;
    return *this;
  }
  bign operator/(const bign &b) {
    bign c, f = 0;
    for (int i = len - 1; i >= 0; i--) {
      f = f * 10;
      f.s[0] = s[i];
      while (f >= b) {
        f -= b;
        c.s[i]++;
      }
    }
    c.len = len;
    c.clean();
    return c;
  }
  bign operator/=(const bign &b) {
    *this = *this / b;
    return *this;
  }
  bign operator%(const bign &b) {
    bign r = *this / b;
    r = *this - r * b;
    return r;
  }
  bign operator%=(const bign &b) {
    *this = *this % b;
    return *this;
  }
  bool operator<(const bign &b) {
    if (len != b.len) return len < b.len;
    for (int i = len - 1; i >= 0; i--) {
      if (s[i] != b.s[i]) return s[i] < b.s[i];
    }
    return false;
  }
  bool operator>(const bign &b) {
    if (len != b.len) return len > b.len;
    for (int i = len - 1; i >= 0; i--) {
      if (s[i] != b.s[i]) return s[i] > b.s[i];
    }
    return false;
  }
  bool operator==(const bign &b) { return !(*this > b) && !(*this < b); }
  bool operator!=(const bign &b) { return !(*this == b); }
  bool operator<=(const bign &b) { return *this < b || *this == b; }
  bool operator>=(const bign &b) { return *this > b || *this == b; }
  string str() const {
    string res = "";
    for (int i = 0; i < len; i++) res = char(s[i] + '0') + res;
    return res;
  }
};
map<int, bool> mp;
const int MAX = 5e4 + 5;
int n, m, Tot, tot;
int a[MAX], b[MAX], pm[MAX], pim[MAX];
bool use[MAX];
void dfs(int n, int I = 0, int tot = 0, int qwq = 0) {
  if (qwq == n - 1) {
    printf("YES\n");
    printf("%d\n", tot);
    for (int i = 0; i < tot; ++i) printf("%d %d\n", a[i], b[i]);
    exit(0);
  }
  if (mp[qwq]) return;
  mp[qwq] = 1;
  for (int i = I + 1; i <= Tot; ++i) {
    if (i == Tot) {
      int qaq = min((int)((long long)(n - 1 - qwq) * pm[i] / n), pm[i] - 1);
      if (qwq + n / pm[i] * qaq != n - 1)
        continue;
      else
        a[tot] = qaq, b[tot] = pm[i], dfs(n, i, tot + 1, qwq + n / pm[i] * qaq);
    } else {
      for (int j = min((int)((long long)(n - 1 - qwq) * (long long)pm[i] /
                             (long long)n),
                       pm[i] - 1);
           j >= 1; --j)
        if (qwq + n / pm[i] * j <= n - 1)
          a[tot] = j, b[tot] = pm[i], dfs(n, i, tot + 1, qwq + n / pm[i] * j);
        else
          break;
    }
  }
}
bool look(int x) {
  if (x == 1) return 0;
  if (x == 2) return 1;
  for (int i = 2; i <= sqrt(x); ++i)
    if (x % i == 0) return 0;
  return 1;
}
void ss(int *pm) {
  use[1] = 1;
  for (int i = 2; i <= m; ++i) {
    if (!use[i]) pm[++tot] = i;
    for (int j = 1; j <= tot && pm[j] * i <= m; ++j) {
      use[i * pm[j]] = 1;
      if (i % pm[j] == 0) break;
    }
  }
}
bool work(int x) {
  int a = n;
  while (a % x == 0) a /= x;
  return a == 1;
}
int main() {
  scanf("%d", &n), m = sqrt(n);
  if (n % 2 == 0 && (n / 2) % 2 == 1 && n != 2) {
    cout << "YES" << endl << "2" << endl << "1 2" << endl;
    cout << (n / 2 - 1) / 2 << " " << n / 2 << endl;
    return 0;
  }
  if (look(n)) return printf("NO"), 0;
  ss(pim);
  for (int i = 1; i <= tot; ++i)
    if (work(pim[i])) return printf("NO"), 0;
  for (int i = 2; i <= m; ++i)
    if (n % i == 0) {
      pm[++Tot] = i;
      if (i != n / i) pm[++Tot] = n / i;
    }
  if (Tot + 2 < 4) return printf("NO"), 0;
  sort(pm + 1, pm + 1 + Tot), dfs(n);
  return printf("NO"), 0;
}
istream &operator>>(istream &in, bign &x) {
  string s;
  in >> s;
  x = s.c_str();
  return in;
}
ostream &operator<<(ostream &out, const bign &x) {
  out << x.str();
  return out;
}