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