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