#include <bits/stdc++.h>
using namespace std;
long long Gcd(long long a, long long b) { return b ? Gcd(b, a % b) : a; }
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 2; i * i <= n; ++i) {
    if (n % i) continue;
    if (Gcd(i, n / i) == 1) {
      int a = i, b = n / i;
      for (int k = 1; k * a < n - 1; ++k) {
        if ((n - 1 - k * a) % b == 0) {
          int j = (n - 1 - k * a) / b;
          puts("YES");
          puts("2");
          printf("%d %d\n", k, b);
          printf("%d %d\n", j, a);
        }
      }
      exit(0);
    }
  }
  puts("NO");
  return 0;
}
