400911: GYM100283 E Ghanophobia
Description
It’s the first day of Eid Al Adha – Happy Eid :D – and all Egyptians are waiting for the fatal match that will decide if Egypt will qualify to the world cup 2014 or not. The qualification final step is made of 2 matches against Ghana. The first match will be played in Ghana and the second in Egypt. As we all know, the winner is decided by adding the results of the two matches, and in case of a tie, a team's goal at the homeland of its opponent is considered 2 goals. For example, if at the first match Ghana won with a result of 6:1, and in the second match Egypt won with a result of 5:0, then the total number of goals are considered equal (6:6). But as Egypt scores a goal in Ghana’s homeland the final result becomes 7:6 goals to Egypt and Egypt qualifies. Taking this fact in consideration, all Egyptians hope to make a positive score in Ghana to make their mission easier when playing the second match at Egypt.
And the match has begun and all Egyptians praying for their team. But the Egyptian team performance was disastrous; and the result was the most humiliating in the Egyptian’s team recent history. They were beaten with 1 goal to 6 for the Ghanaian team. The result and performance of the Egyptian team drove many Egyptian crazy. Many people were walking in the street hallucinating about the result of the second match that would make Egypt qualify to the world cup. Psychologists diagnosed these symptoms as Ghanophobia. To be brief; Ghanophobia symptoms can be summarized as the following: the patient starts asking whether a specific result for the second match would guarantee the qualification of the Egyptian team or not. For example a patient may ask 5:0 (5 goals for the Egyptian team to 0 for the Ghanaian team) and he should be answered with YES and for example if he said 1:0 he should be answered NO.
The second match is very close and still many Egyptians are hoping to make up the match. As many Egyptians Bakkar and his friends decided to support their team and go to the stadium to watch the match. But unfortunately the stadium will be full of people having Ghanophobia which will make it very hard to focus on supporting the Egyptian team while many people are hallucinating. Bakkar decided to make automatic answering machines that can answer people with Ghanophobia so they don’t disturb other supporters with asking. As a computer science student Bakkar will program these machines. He is going to write a program that given an expected result for the second match; it will answer with YES is this results would guarantee the qualification to the Egyptian team and NO if not. In case of tie print PENALTIES.
P.S.: Be careful while computing the results and don't say NO unless you are sure because if Egypt didn't qualify, Magdi AbdelGhany will nag us for 4 more years.
InputYour program will be tested on one or more test cases. The first line of the input will be a single integer T, the number of test cases (1 ≤ T ≤ 104). Followed by T test cases, each test case will consist of a string consisting of 2 number separated by a colon. The first number indicates the goals expected to be scored by the Egyptian team and the second number is the number of goals expected to be scored by the Ghanaian team. For example 6:1 means 6 goals scored by the Egyptian team to 1 goal scored by the Ghanaian team.
0 ≤ Scores ≤ 100.
OutputFor each test case one line containing "Case n:" (without the quotes) where n is the test case number (starting from 1) followed by the answer for the given result.
ExamplesInput3Output
6:0
1:1
6:1
Case 1: YES
Case 2: NO
Case 3: PENALTIES