#include <bits/stdc++.h>
using namespace std;
int n, i, s = 0;
int main() {
  cin >> n;
  i = 1;
  while (s < n) {
    s = s + i;
    i++;
  }
  if (s == n)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
