#include <bits/stdc++.h>
using namespace std;
int main() {
  int tn, l = 0;
  cin >> tn;
  for (int i = 0; i <= tn; i++) {
    if ((i * (i + 1)) / 2 == tn) {
      l = 1;
    }
  }
  if (l == 1) {
    cout << "YES";
  } else {
    cout << "NO";
  }
}
