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