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