Lord of the Ring

Time limit1sMemory limit128 MB

Problem

Frodo must accomplish a noble and difficult mission: he must destroy a wicked magic ring. In this quest he must travel to a dangerous place called Mordor and throw the ring into a crevice of fire. He has been away from home for some time and is currently following a straight, quite long road that has bushes here and there. Being very tired, Frodo thinks he had better take some rest.

The only safe place along the road is a single bush whose position can be computed with a magic formula. That formula uses a value $P$, which is the product of the distances between adjacent pairs of bushes along the road. Unfortunately, all Frodo knows are the distances between every pair of bushes along the road and the magic formula; he does not know the value of $P$. Can you help him?

Input

Each data set in the file stands for one collection of distances between pairs of bushes on the road Frodo is traveling along. Each data set starts with the number of distances, followed by the distances in nondecreasing order. White space may occur freely in the input.

There are at least $2$ and at most $1000$ bushes along the road. Moreover, the value of $P$ cannot exceed $10^9$.

Output

For each data set, the program prints the value of $P$ to standard output, each at the beginning of a separate line. If the given distances correspond to a set of bushes on the road, that set is unique up to reflection, so $P$ is well-defined. If no arrangement of bushes matches the distances, it prints No solution.