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