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