Cookie Monster grew bored of the old Sesame Street and decided to emigrate to Byteland. Sadly, Byteland has no delicious sweet cookies. Unwilling to leave the digital land behind, Cookie Monster resolved to try the local specialty instead: numbers. Settling comfortably into a restaurant, he ordered a plate of fresh factorials. Unsure whether they would suit his taste, he nibbled just two adjacent digits off each one. Right then the waiter realized he had mixed up the orders: the factorials he had served were a limited edition reserved for King Byte himself, and it was the very last portion left in the storeroom! The distraught waiter must now fill the gnawed gaps, praying the king won't notice the difference. He cannot work out on his own which digits to use to plug the holes. Help the waiter and tell him which digits each gap should be filled with.
Formally, for each test case you are given an integer N and the decimal representation of N! (N factorial) in which two adjacent digits have been replaced by the letters a and b (always in that order). Determine the digit that replaces a and the digit that replaces b.
The first line contains the number of test cases T (1≤T≤100). Each of the next T lines contains one test case, consisting of two values. The first, N (4≤N≤100000), is the number whose factorial is on the menu. The second is that factorial N! with two adjacent digits replaced by the letters ab (always in this order).
For each test case, print on its own line the two digits, separated by a single space, that should replace a and b respectively so that the resulting number is the correct factorial.