提示: 欢迎访问OurACM平台。
Problem 1873 Coin Puzzle

Accept: 34    Submit: 154
Time Limit: 1000 mSec    Memory Limit : 32768 KB

Problem Description

Xiao Bo likes collect coin so much. One day, he comes with an idea. He goes to the super market and buys a big rectangle paper. Then he wants to make a convex polygon, so he paints a convex polygon on the paper, here is an example: (All the vertices are given in counter-clockwise in this problem)
After several cut, he get the following shape.

Now Xiao Bo wants to put two coins inside the shape. However, the two coins should not overlap. (But Tangent is ok!)

Now your task is so simple. Xiao Bo will give you all the information about the polygon and two coins, could you tell him if it’s possible to put two coins inside the polygon without overlap?

Note: The coordinate system is:

Input

There are no more than 10 cases. For any case, the first line has three numbers: N, D1, D2. Here N indicates the number of vertices ( 1 <= N <= 10) D1 and D2 indicate the radius of the two coins.(0 < D1,D2 <= 10000) Then follows N lines, every line contains only two real numbers xi and yi, indicates the coordinate of the i-th vertice. (0<=xi, yi<=10000) All the vertices are given in counter-clockwise in this problem.

Output

Out a single line, first output “Case %m: “ where m is the case number count from 1, then output “Yes” if it’s possible for Xiao Bo to put two coins inside the polygon, otherwise output “No” instead.

Sample Input

3 0.005 0.007 0 0 10000 0 0 10000 3 10000 10000 0 0 10000 0 0 10000

Sample Output

Case 1: Yes Case 2: No

Source

AekdyCoin

Submit  Back  Status  Discuss