#include using namespace std; #define ALL(x) x.begin(),x.end() #define rep(i,n) for(int i=0;i<(n);i++) #define debug(v) cout<<#v<<":";for(auto x:v){cout<bool chmax(T &a,const T &b){if(abool chmin(T &a,const T &b){if(b ostream &operator<<(ostream &os,const pair&p){ os< ostream &operator<<(ostream &os,const vector&v){ for(int i=0;i<(int)v.size();i++) os<0){ res.push_back('0'+num%10); num/=10; } if(neg) res.push_back('-'); reverse(begin(res),end(res)); os<>(istream &is,__int128 &n){ string s; is>>s; int idx=0; bool neg=false; if(s[0]=='-')neg=true,idx++; n=0; for(;idx<(int)s.size();idx++){ n=10*n+s[idx]-'0'; } if(neg) n=-n; return is; } __int128 abs(__int128 x){ return x<0?-x:x; } __int128 gcd(__int128 a,__int128 b){ if(a==0) return b; if(b==0) return a; return b>0?gcd(b,a%b):a; } signed main(){ ll nll;cin>>nll; int128 n=nll; ll kll=floor(sqrt(double(n))); int128 k=kll; for(int128 i=max(int128(0),k-1000);i<=k+1000;i++){ if(i*(i+1)/2==n){ cout<<"Yes"<