시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB52125.000%

문제

In far off Azeland they have a problem with their stamps. Inflation has been fierce, and the old denominations of 1, 5, and 12 lars now mean that for most letters there is not enough room to write the address after the stamps have been put on, so a government commission has been established to choose a new set of denominations.

They plan to keep the 1 lar stamp for historical reasons, but have discovered an obscure requirement in the postal legislation that requires it to be possible to make all "sufficiently large" amounts of postage without using the 1 lar stamp.

A tame mathematician at the university of Ogato has reassured them that this requirement will be met provided that the denominations of the remaining stamps have no common factor larger than 1. He did however mention that there is no known simple formula in that case to determine just what "sufficiently large" means precisely.

In order to evaluate the competing suggestions they would like to know first of all whether a set of denominations is acceptable at all and, if it is, what is the largest amount of postage that actually requires the use of the 1 lar stamp.

For instance, denominations of 9, 12, and 15 would be unacceptable, because they are all multiples of 3. Denominations of 4 and 7 would be acceptable, and the largest postage requiring the 1 lar stamp is 17 lar.

입력

Input will consist of a number of sets of suggested denominations (the 1 lar stamp is omitted). Each denomination will be between 2 and 10,000 lar inclusive, and there will not be more than 10 denominations in a set. For each such set you must answer the questions above. Input is terminated by a sequence that begins with 0.

출력

For each sequence, output consists of either the word "Unacceptable" or a single positive integer specifying the largest value not achievable with stamps of those values, i.e. the largest value that requires the use of a 1 lar stamp.

예제 입력 1

9 12 15
4 7
3 5 7
0

예제 출력 1

Unacceptable
17
4