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