#include <bits/stdc++.h>
using namespace std;
bool a[10000];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < 50; i++) a[(i + 1) * (i + 2) / 2] = true;
  if (a[n])
    cout << "YES";
  else
    cout << "NO";
}
