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