#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, x = 0;
  cin >> t;
  long long int a[500];
  for (int i = 0; i < 500; i++) {
    a[i] = (i * i) + i;
    a[i] = a[i] / 2;
  }
  for (int i = 0; i < 500; i++) {
    if (a[i] == t) {
      x = 1;
      break;
    }
  }
  if (x == 1) {
    cout << "YES";
  } else {
    cout << "NO";
  }
}
