140A.md (1398B)
1 Source: https://codeforces.com/problemset/problem/140/A 2 3 A. New Year Table 4 5 time limit per test 6 7 2 seconds 8 9 memory limit per test 10 11 256 megabytes 12 13 input 14 15 stdin 16 17 output 18 19 stdout 20 21 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. 22 23 Input 24 25 The first line contains three integers *n*, *R* and *r* (1 ≤ *n* ≤ 100, 1 ≤ *r*, *R* ≤ 1000) — the number of plates, the radius of the table and the plates' radius. 26 27 Output 28 29 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". 30 31 Remember, that each plate must touch the edge of the table. 32 33 Examples 34 35 Input 36 37 ``` 38 4 10 4 39 ``` 40 41 Output 42 43 ``` 44 YES 45 ``` 46 47 Input 48 49 ``` 50 5 10 4 51 ``` 52 53 Output 54 55 ``` 56 NO 57 ``` 58 59 Input 60 61 ``` 62 1 10 10 63 ``` 64 65 Output 66 67 ``` 68 YES 69 ``` 70 71 Note 72 73 The possible arrangement of the plates for the first sample is: 74 75 