Jim wants to make a lot of bows for her birthday party, so she buys several rolls of ribbon in different colors. When she starts making the bows she finds that the first inch and the last inch of every roll are dirty and cannot be used. To make bows she has to cut the ribbon, and the pieces have to be as long as possible. Every piece must have the same length.
A roll of length k gives k−2 inches of usable ribbon once the dirty inch at each end is dropped. Every roll must be cut into pieces of that one common length with nothing left over.
The input is read from standard input and consists of several lines. Each line starts with the integer n, the number of rolls, where 2≤n≤10. Then come n numbers, the ribbon length k of each roll, where 5≤k≤500000. All numbers on a line are separated by a single space. Process the lines until the input ends.
For each input line print two integers on one line, separated by a single space. The first number is the length of one cut piece. The second number is the total number of bows Jim can make.