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