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