P13365 [GCJ 2011 #1A] FreeCell Statistics
Description
I played $D$ ($D > 0$) games of FreeCell today. Each game of FreeCell ends in one of two ways -- I either win, or I lose. I've been playing for many years, and have so far played $G$ games in total (obviously, $G \geq D$).
At the end of the day, I look at the game statistics to see how well I have played. It turns out that I have won exactly $P_D$ percent of the $D$ games today, and exactly $P_G$ percent of $G$ total games I had ever played. Miraculously, there is no rounding necessary -- both percentages are exact! Unfortunately, I don't remember the exact number of games that I have played today ($D$), or the exact number of games that I have played in total ($G$). I do know that I could not have played more than $N$ games today ($D \leq N$).
Are the percentages displayed possible, or is the game statistics calculator broken?
Input Format
The first line of the input gives the number of test cases, $T$. $T$ lines follow. Each line contains 3 integers -- $N$, $P_D$ and $P_G$.
Output Format
For each test case, output one line containing "Case #$x$: $y$", where $x$ is the case number (starting from 1) and $y$ is either "Possible" or "Broken".
Explanation/Hint
**Sample Explanation**
In Case #3, I could have played $5$ games today ($D = 5$) and $25$ games in total ($G = 25$), and won $4$ games today ($80\%$ of $5$) and $14$ games in total ($56\%$ of $25$).
**Limits**
- $0 \leq P_D \leq 100$;
- $0 \leq P_G \leq 100$.
**Small dataset (6 Pts, Test set 1 - Visible)**
- $1 \leq T \leq 100$;
- $1 \leq N \leq 10$.
- Time limit: ~~30~~ 3 seconds.
**Large dataset (14 Pts, Test set 2 - Hidden)**
- $1 \leq T \leq 2000$;
- $1 \leq N \leq 10^{15}$.
- Time limit: ~~60~~ 6 seconds.