#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long INFLL = 1e18;
const int MOD = 998244353;
const int alphabet = 26;
const double PI = 3.1415926535;
const int MAXINT = 4e5 + 1;
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;
}
bool find_any_solution(long long a, long long b, long long c, long long &x0,
                       long long &y0, long long &g) {
  g = gcd(abs(a), abs(b), x0, y0);
  if (c % g) {
    return false;
  }
  x0 *= c / g;
  y0 *= c / g;
  if (a < 0) x0 = -x0;
  if (b < 0) y0 = -y0;
  int k = 1;
  if (x0 <= 0 && y0 >= 0) {
    k = abs(x0 / (b / g));
    x0 += k * (b / g), y0 -= k * (a / g);
    if (x0 <= 0 && y0 >= 0) {
      x0 += (b / g), y0 -= (a / g);
    }
  }
  if (x0 >= 0 && y0 <= 0) {
    k = -abs(y0 / (a / g));
    x0 += k * (b / g), y0 -= k * (a / g);
    if (x0 >= 0 && y0 <= 0) {
      x0 -= (b / g), y0 += (a / g);
    }
  }
  return !(x0 <= 0 || y0 <= 0 || x0 >= b || y0 >= a);
}
int main() {
  long long n;
  scanf("%lld", &n);
  long long p, a0 = -1, a1 = -1, g = 0;
  for (int i = 2; i < sqrtl(n) + 1; i++)
    if (a0 == -1 && n % i == 0) {
      if (find_any_solution(i, n / i, n - 1, a0, a1, g)) {
        p = i;
      } else
        a0 = a1 = -1;
    }
  if (a0 == -1)
    printf("NO\n");
  else {
    printf("YES\n2\n");
    printf("%lld %lld\n", a0, n / p);
    printf("%lld %lld\n", a1, p);
  }
  return 0;
}
