#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  bool flag = false;
  for (int i = 0; i < n + 2; ++i)
    if (i * (i + 1) / 2 == n) flag = true;
  cout << (flag ? "YES" : "NO");
  return 0;
}
