#include #include using namespace std; using ll = long long; int main() { ll N;cin >>N; const ll m = sqrt(2*N); if(m*(m+1)/2 == N){ cout << "YES"<