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