#include #include #include #include using namespace std; int main(){ long n; cin >> n; if(round(sqrt(n * 8 + 1)) * round(sqrt(n * 8 + 1)) == n * 8 + 1){ cout << "YES" << endl; cout << (round(sqrt(n * 8 + 1)) - 1) / 2 << endl; }else{ cout << "NO" << endl; } }