#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  bool ok = 0;
  for (int i = 1; i < 501; i++) {
    if ((i * (i + 1)) / 2 == n) ok = 1;
  }
  puts(ok ? "YES" : "NO");
}
