#include <bits/stdc++.h>
using namespace std;
int n;
int a, b;
void get_divisor() {
  int fa = 0, fb = 0;
  for (int i = 2; i * i <= n; i++)
    if (n % i == 0) {
      fa = a = i;
      fb = b = n / i;
      break;
    }
  if (fa == 0) {
    puts("NO");
    return;
  }
  while (b % fa == 0) {
    a *= fa;
    b /= fa;
  }
  if (a > b) swap(a, b);
  if (a == 1) {
    puts("NO");
    a = 0;
  }
}
void get_answer() {
  puts("YES");
  puts("2");
  for (int i = 1; i < a; i++)
    if ((n - 1 - b * i) % a == 0) {
      cout << i << ' ' << a << '\n';
      cout << (n - 1 - b * i) / a << ' ' << b << '\n';
      return;
    }
}
int main() {
  cin >> n;
  get_divisor();
  if (a != 0) get_answer();
  return 0;
}
