#include <bits/stdc++.h>
using namespace std;
void op() { freopen("input.txt", "r", stdin); }
long long n;
bool foo(long long d) {
  for (long long i = 1; i < d; i++) {
    long long a = (n - 1 - i * (n / d));
    if (a % d == 0) {
      cout << "YES\n2\n";
      cout << i << " " << d << "\n";
      cout << a / d << " " << n / d << "\n";
      return 1;
    }
  }
  return 0;
}
int main() {
  cin >> n;
  for (long long i = 2; i * i <= n; i++)
    if (n % i == 0 && foo(i)) return 0;
  cout << "NO";
  return 0;
}
