#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int i = 1, t = 1;
  while (t < n) {
    i = i + 1;
    t = t + i;
  }
  if (t == n)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
