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