4147.New Year Table

Time Limit: 1s Memory Limit: 256MB

Gerald is setting the New Year table. The table has the form of a circle; its radius equals R. Gerald invited many guests and is concerned whether the table has enough space for plates for all those guests. Consider all plates to be round and have the same radii that equal r. Each plate must be completely inside the table and must touch the edge of the table. Of course, the plates must not intersect, but they can touch each other. Help Gerald determine whether the table is large enough for n plates.

Input Format(From the terminal/stdin)

The first line contains three integers n, R and r (1 \le n \le 100, 1 \le r,R \le 1000) - the number of plates, the radius of the table and the plates' radius.

Output Format(To the terminal/stdout)

Print "YES" (without the quotes) if it is possible to place n plates on the table by the rules given above. If it is impossible, print "NO".

Remember, that each plate must touch the edge of the table.

Sample Input 1

Copy
4 10 4
 ·  · \n

Sample Output 1

Copy
YES
   \n

Sample Input 2

Copy
5 10 4
 ·  · \n

Sample Output 2

Copy
NO
  \n

Sample Input 3

Copy
1 10 10
 ·  ·  \n

Sample Output 3

Copy
YES
   \n

Hints

The possible arrangement of the plates for the first sample is:

4147_1.png

Submit

请先 登录

© 2025 FAQs