#include <bits/stdc++.h>
using namespace std;
int main() {
  int x;
  cin >> x;
  int c = 1;
  for (int i = 0; i <= 500;) {
    if (x == i) {
      cout << "YES" << endl;
      return 0;
    }
    i += c;
    c++;
  }
  cout << "NO" << endl;
}
