#include #include using namespace std; int main (){ long long int n,sum=0; cin >> n; for(int i=0; sum <= n; i++){ sum += i; if( sum == n ) { cout << "YES" << endl; cout << i << endl; return 0; } } cout << "NO" << endl; return 0; }