#Lutece0334. Triangular numbers

Triangular numbers

Migrated from Lutece 334 Triangular numbers

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

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 nthn_{th} triangular number is the number of dots in a triangle with n dots on a side.

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

Input

There are multi-cases, for each case there is only a single number nn (1n5001\leq  n\leq  500) — the given integer.

Output

For each case, if the given integer is a triangular number output YES, otherwise output NO.

Samples

1
2
3
YES
NO
YES

Resources

2011寒假训练(一)(Not Original)