#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5, M = 1e6 + 6, OO = 0x3f3f3f3f;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < 50; i++) {
    int x = i * (i + 1) / 2;
    if (n == x) {
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
  return 0;
}
