#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return a ? gcd(b % a, a) : b; }
void print(int a, int b) {
  auto d = gcd(a, b);
  a /= d;
  b /= d;
  cout << a << ' ' << b << endl;
}
int main() {
  int n, a = 1, b;
  cin >> n;
  for (int d = 2; d * d <= n; d++)
    if (n % d == 0) {
      auto nn = n;
      while (nn % d == 0) nn /= d, a *= d;
      break;
    }
  b = n / a;
  if (a == 1 || b == 1) return cout << "NO\n", 0;
  if (a > b) swap(a, b);
  int x = a, y = b;
  while ((y + 1) % x) y += b;
  x = n - 1 - y;
  cout << "YES\n2\n";
  print(x, n);
  print(y, n);
  return 0;
}
