A triangular number is the number of dots in an equilateral triangle uniformly filled with dots. For example, three dots can be arranged in a triangle; thus three is a triangular number. The n-th triangular number is the number of dots in a triangle with n dots on a side. <image>. You can learn more about these numbers from Wikipedia (http://en.wikipedia.org/wiki/Triangular_number).

Your task is to find out if a given integer is a triangular number.

Input

The first line contains the single number n (1 ≤ n ≤ 500) — the given integer.

Output

If the given integer is a triangular number output YES, otherwise output NO.

Examples

Input

1


Output

YES


Input

2


Output

NO


Input

3


Output

YES
#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  if (n == 1 or n == 3 or n == 6 or n == 10 or n == 15 or n == 21 or n == 28 or
      n == 36 or n == 45 or n == 55 or n == 66 or n == 78 or n == 91 or
      n == 105 or n == 120 or n == 136 or n == 153 or n == 171 or n == 190 or
      n == 210 or n == 231 or n == 253 or n == 276 or n == 300 or n == 325 or
      n == 351 or n == 378 or n == 406 or n == 435 or n == 465 or n == 496)
    cout << "YES";
  else
    cout << "NO";
}
