You are a brave adventurer standing before a massive door of an ancient vault. The door has three runic pedestals on which you must place three magic stones with specific weights. Legends say the door will only open if a strict sequence of rules is followed. If the order is broken or an incorrect combination is used, a trap will trigger or the mechanism simply won't work.
Opening rules:
- The total weight of the three stones (
A, B, C) must be exactly 100. This is the main condition for activating the mechanism.
- If the total weight is correct (equals 100), the mechanism checks for traps. A trap triggers if any two stones have the same weight. The ancients did not tolerate duplicates.
- If no trap is triggered, further checks proceed. The weight of each stone must be strictly greater than 10. Stones with lower weight are considered "immature".
- And finally, the trickiest rule: among the three stones, at least one must have a prime weight (a prime number). This is the "key" to the lock.
Your task is to write a program that, given the weights of three stones, determines what will happen.
Input format
one line containing three whole positive The numbers & nbsp; a , & nbsp; b & nbsp; and & nbsp; c , separated by spaces.
Output format
depending on the fulfillment of the conditions, the program should derive one of three phrases:
rn
The storage is open & nbsp; & mdash; If all the conditions for the opening are fulfilled. rn
trap! & nbsp; & mdash; If the trap has worked for the same stones (provided that their amount is 100). rn
incorrect combination & mdash; In all other cases (the amount is not equal to 100; or one of the stones & lt; = 10; or there is not a single stone with a simple weight). rn
Hint
There will be no clue here, decide for yourself!