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