#include <bits/stdc++.h>
using namespace std;
bool flag[125255];
int main() {
  int i, j, n;
  memset(flag, false, sizeof(flag));
  for (i = 1; i < 501; i++) {
    j = (int)((i * (i + 1)) / 2);
    flag[j] = true;
  }
  while (scanf("%d", &n) == 1) {
    if (flag[n]) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
  }
  return 0;
}
