#include using namespace std; typedef long long LL; int main(int argc, char* argv[]) { LL n; cin>>n; LL i=1; LL N=0; while(true){ N+=i; if (N>=n){ break; } i++; } if (N==n){ cout<<"YES"<