#include using namespace std; using i64 = long long; #define rep(i,s,e) for(int (i) = (s);(i) <= (e);(i)++) i64 n; int main(){ cin >> n; i64 l = 1; i64 r = (i64)1e9 * 2; while(r - l > 1){ i64 m = (l + r) / 2; i64 a = m; i64 b = m + 1; if(a & 1) b /= 2; else a /= 2; //cout << a * b << endl; if(a * b > n){ r = m; } else{ l = m; } } i64 a = l; i64 b = l + 1; if(a & 1) b /= 2; else a /= 2; if(a * b == n){ cout << "YES" << endl << l << endl; } else{ cout << "NO" << endl; } }