#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  cin >> n;
  bool flag = false;
  for (int i = 1; i < 500; i++) {
    int k = i * (i + 1) / 2;
    if (n == k) {
      flag = true;
      break;
    }
  }
  if (flag)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
