#include <bits/stdc++.h>
int main() {
  int n, sum = 0, i = 1;
  scanf("%d", &n);
  while (sum < 502) {
    sum += i;
    i++;
    if (sum == n) {
      printf("YES");
      return 0;
    }
  }
  printf("NO");
  return 0;
}
