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