#include <bits/stdc++.h>
using namespace std;
long long int a, b;
bool temp = false;
int main() {
  cin >> a;
  for (b = 1; b <= 500; b++)
    if ((b * (b + 1)) / 2 == a) {
      temp = true;
      break;
    }
  if (temp)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
