#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
string to_string(string s) { return '"' + s + '"'; }
string to_string(char s) { return string(1, s); }
string to_string(const char *s) { return to_string((string)s); }
string to_string(bool b) { return (b ? "true" : "false"); }
template <typename A>
string to_string(A);
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A>
string to_string(A v) {
  bool f = 1;
  string r = "{";
  for (const auto &x : v) {
    if (!f) r += ", ";
    f = 0;
    r += to_string(x);
  }
  return r + "}";
}
void debug_out() { cout << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cout << " " << to_string(H);
  debug_out(T...);
}
inline long long add(long long a, long long b) {
  a += b;
  if (a >= MOD) a -= MOD;
  return a;
}
inline long long sub(long long a, long long b) {
  a -= b;
  if (a < 0) a += MOD;
  return a;
}
inline long long mul(long long a, long long b) {
  return (long long)((long long)a * b % MOD);
}
inline long long binpow(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = mul(res, a);
    a = mul(a, a);
    b /= 2;
  }
  return res;
}
inline long long inv(long long a) { return binpow(a, MOD - 2); }
long long gcd(long long a, long long b, long long &x, long long &y) {
  if (a == 0) {
    x = 0, y = 1;
    return b;
  }
  long long x1, y1;
  long long d = gcd(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return d;
}
void findPositiveSolution(long long a, long long b, long long n) {
  long long x, y;
  long long d = gcd(a, b, x, y);
  assert(1ll * a * x + 1ll * b * y == d);
  if (x <= 0) {
    swap(x, y);
    swap(a, b);
  }
  x *= n / d;
  y *= n / d;
  long long k = (-y + a - 1) / a;
  x -= k * b;
  y += k * a;
  assert(x > 0 && y > 0 && 1ll * a * x + 1ll * b * y == n);
  cout << "YES\n2\n";
  cout << x << " " << (n + 1) / a << "\n";
  cout << y << " " << (n + 1) / b << "\n";
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  vector<long long> prime;
  long long m = n;
  for (long long i = 2; 1ll * i * i <= n; ++i)
    if (m % i == 0) {
      while (m % i == 0) m /= i;
      prime.push_back(i);
    }
  if (m > 1) prime.push_back(m);
  if (prime.size() == 1) {
    cout << "NO\n";
    return 0;
  }
  findPositiveSolution(prime[0], prime[1], n - 1);
  return 0;
}
