#include <bits/stdc++.h>
using namespace std;
unsigned long long a[506], n;
int main() {
  for (int i = 1; i <= 506; i++) a[i] = (((i) * (i + 1)) / 2);
  cin >> n;
  for (int i = 1; i < 507; i++) {
    if (a[i] == n) {
      cout << "YES" << endl;
      return 0;
    } else if (a[i] > n) {
      cout << "NO" << endl;
      return 0;
    }
  }
  return 0;
}
