#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int a;
  cin >> a;
  int b = 1, c = 2;
  for (int i = 0; i < 1000; i++) {
    if (a == b) {
      cout << "YES";
      return 0;
    }
    b += c;
    c++;
  }
  cout << "NO";
}
