Prof. Baqir, who is a keen user, went to his calculator. The first number 1 is written…
- User
Prof. Baqir, who is a keen user, went to his calculator. The first number 1 is written on his calculator. Since he is born, he can only do two things: either he multiplies the number written on the calculator by 5, or he divides the number written on the calculator by 2. Then he reads the number written on the calculator. Because he has asked you to give him the final number displayed on his calculator in a readable manner after receiving the operations performed. It is a readable number for the professor a b x 1 0 c a b ×10 c May it be in it a a is a natural number and b , c b, c are integers and the following conditions are met:
1 0 9 ≤ b , c ≤ 1 0 9 -10 9 ≤ b, c ≤ 10 9
1 ≤ a ≤ 1 0 9 1≤a≤10 9
input The first line of the input contains the number n n is the number of operations that the professor has performed. in each of n n The next line is a number that represents what the professor does. If this number is 2, it means that the professor has divided the number written on the calculator by 2, and if this number is 5, it means that the professor has multiplied the number written on the calculator by 5. 1 ≤ n ≤ 10
000 1≤n≤10 000
output The only output line should contain three numbers a , b , c Let a, b, c be integers and:
1 ≤ a ≤ 1 0 9 1≤a≤10 9
1 0 9 ≤ b , c ≤ 1 0 9 -10 9 ≤ b, c ≤ 10 9
Example Sample entry 1 2 5 2 Plain text Sample output 1 52-1 Plain text Sample input 2 2 5 5 Plain text Sample output 2 25 1 0
- Assistant