#include <bits/stdc++.h>
using namespace std;
map<int, int> mp;
int main() {
  int n;
  scanf("%d", &n);
  int tmp = n;
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      mp[i] = 1;
      while (n % i == 0) n /= i;
    }
  }
  if (n > 1) mp[n] = 1;
  if (mp.size() == 1) {
    puts("NO");
    return 0;
  }
  int a = mp.begin()->first, b = (++mp.begin())->first;
  n = tmp;
  if (a > b) swap(a, b);
  for (int i = 1; i < b; i++) {
    int remain = n - 1 - i * a;
    if (remain % b == 0) {
      puts("YES\n2");
      printf("%d %d\n%d %d\n", i, n / a, remain / b, n / b);
      return 0;
    }
  }
  return 0;
}
