#include using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define req(i,n) for(int i = 1;i <= n; i++) #define rrep(i,n) for(ll i = n-1;i >= 0;i--) #define ALL(obj) begin(obj), end(obj) #define RALL(a) rbegin(a),rend(a) typedef long long int ll; typedef long double ld; template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } const ll INF = 1e18; ll mod = 998244353; int main(){ ll n;cin >>n; ll ng = 1e9,ok = 0; while(ng-ok >1){ ll mid = (ng+ok)/2; ll sum = (mid+1)*mid/2; if(sum <= n) ok = mid; else ng = mid; }if(ok*(ok+1)/2==n){ cout << "Yes"<