#include <bits/stdc++.h>
using namespace std;
bool triangular[10000];
int formula(int n) { return (n * (n + 1)) / 2; }
int main() {
  for (int i = 0; i <= 100; i++) {
    triangular[formula(i)] = true;
  }
  int n;
  cin >> n;
  if (triangular[n]) {
    printf("YES\n");
  } else {
    printf("NO\n");
  }
  return 0;
}
