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