#include <bits/stdc++.h>
using namespace std;
long long exgcd(long long a, long long b, long long &x, long long &y) {
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  }
  long long r = exgcd(b, a % b, x, y);
  long long t = x;
  x = y;
  y = t - a / b * y;
  return r;
}
int main() {
  long long n;
  scanf("%lld", &n);
  for (int i = 2; i * i <= n; i++) {
    if (n % i != 0) continue;
    long long a = i, b = n / a;
    long long x, y;
    long long d = exgcd(a, b, x, y);
    if ((n - 1) % d) continue;
    x = (x + b / d) * ((n - 1) / d);
    x = (x % (b / d) + b / d) % (b / d);
    y = (n - 1 - a * x) / b;
    printf("YES\n2\n");
    printf("%lld %lld\n", y, a);
    printf("%lld %lld\n", x, b);
    return 0;
  }
  printf("NO\n");
}
