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