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