Mimi has recently found a very fun game - Candy Shop Tycoon! In this game, you are the owner of a candy store enterprise, each of which will produce some amount of candy at a constant rate.
Mimi, being a new player, only owns
She is trying to complete a quest where she must produce exactly
Constraints
Input Specification
The first line of input will contain 3 space-separated integers:
The second and final line of input will contain a single integer:
Output Specification
Output QUEST CLEARED
if this is possible, and TRY AGAIN
otherwise.
Sample Input 1
2 3 5
1000
Sample Output 1
QUEST CLEARED
Explanation for Sample Output 1
If we let all three shops produce candy, then we will produce
Sample Input 2
1 10 20
3089
Sample Output 2
QUEST CLEARED
Explanation for Sample Output 2
If we let all three shops produce candy, then we will produce
Shutting off the first and second shops for
Sample Input 3
2 4 6
7
Sample Output 3
TRY AGAIN
Comments