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