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
import java.util.Scanner;
 
public class Switchs {
 
    
    public static void main(String[] args) {
        Scanner input = new Scanner (System.in);
        
int tri;
tri=input.nextInt();
 
       
       switch(tri) 
   {
           case 1 : 
           case 3:
           case 6 :
           case 10 :
           case 15:
           case 21:
           case 28 :
           case 36 : 
           case 45:
           case 55:
           case 66 :
           case 78:
           case 91:
           case 105 :
           case 120 : 
           case 136:
           case 153:
           case 171 :
           case 190:
           case 210:
           case 231 :  
           case 253 : 
           case 276:
           case 300:
           case 325:
           case 351:
           case 378:
           case 406:
           case 435:
           case 465:
           case 496: 
           {
               System.out.println("YES");
               break;
           }
           default :  
                    System.out.println("NO");
       }
    }
}
 