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