#include <bits/stdc++.h>
int main() {
  int n, i, l, t;
  l = 0;
  scanf("%i", &n);
  t = 0;
  for (i = 0; i <= n; i++) {
    t = i * (i + 1) / 2;
    if (n == t) {
      l = 1;
      break;
    }
  }
  if (l == 1)
    printf("YES");
  else
    printf("NO");
  return 0;
}
