|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|2 초||256 MB||13||4||4||100.000%|
Jim wants to make a lot of bows for her birthday party. She buys many rolls of ribbon in different colors. When she starts to make a bow, she finds out that the first and the last inch of every roll are dirty and cannot be used. To make bows, she has to cut the ribbon as long as possible. However, each piece of ribbon must have the same length.
The input must be read from standard input. Each line starts with integer n, which is the number of rolls, 2 <= n <= 10. The next n numbers are the ribbon's length of each roll, k, where 5 <= k <= 500000. Each number is separated by a space.
For each line shows two integers. The first number is the length of piece of ribbon after cut off. The last number is the total amount of bows that Jim can make. Each number is separated by a space.
You must display the results in an exact form as shown in the sample output below.
3 14 23 29 2 11 29 4 200 120 180 500
3 20 9 4 2 496