#include <bits/stdc++.h>
using namespace std;
bool t[501];
int main() {
  for (int i = 1; i * (i + 1) / 2 <= 500; i++) t[i * (i + 1) / 2] = true;
  int n;
  scanf("%d", &n);
  printf(t[n] ? "YES\n" : "NO\n");
  return 0;
}
