#include<bits/stdc++.h> #define forn(i, n) for (int i = 0 ; i < int(n) ; i++) #define fore(i, s, t) for (int i = s ; i < (int)t ; i++) #define fi first #define se second #define all(x) x.begin(),x.end() #define pf2(x,y) printf("%d %d ",x,y) #define pf(x) printf("%d ",x) #define each(x) for(auto it:x) cout<<it<<endl; #define pii pair<int,int> #define sc(x) scanf("%d",&x) using namespace std; typedef long long ll; const int maxn=2e5+5; const int maxm=2e5+5; const int inf=1e9; int main() { ll n; cin>>n; ll p=0; for(ll i=2;i*i<=n;i++){ if(n%i==0){ p=i;break; } } if(!p) p=n; ll x=n,y; while(x%p==0) x/=p; if(x==1) { puts("NO"); return 0; } y=n/x; if(x>y) swap(x,y); for(ll c=1;c<x;c++){ if((c*y+1)%x==0) { puts("YES"); ll d=(n-1-c*y)/x; cout<<2<<endl; printf("%lld %lld ",c,x); printf("%lld %lld ",d,y); return 0; } } }