#Lutece3348. Train
Train
Description
There is a train at station A with an initial speed of . Every second, you can choose to set the acceleration of the train to or . After leaving station A, the speed of the train cannot be until it reaches station B. The distance between station A and station B is . Given the distance , can the train stop exactly at station B if the acceleration is set properly?
The train stops exactly at station B which means that when the train arrives at station B, its speed should be exactly .
The relationship between initial speed (), acceleration (), time () and distance () can be described by the equation: .
Input
A single integer (), denoting the distance between station A and station B.
Output
Output YES
if it is possible to stop at station B. Otherwise, output NO
.
Samples
4
YES
7
YES
5
NO
Note
For the second example, the following graph shows a possible way.
Resources
电子科技大学第十五届 ACM 趣味程序设计竞赛