ÀẨ
Language: Russian
English

Remote Training on Programming

Problems Online status Contests
News FAQ E-learning
For authors:
Register  ||  Login
 
Hello, Guest! Please login or register.

1330. Sages

Time Limit: 1 seconds
Memory Limit:65536KB
Points:100
View Problem Statistics Submit Problem added debug

A group of sages had a very lively discussion of sophisticated topics. After a while, feeling quite tired, they thought that some good tea and a big tasty apple pie would make them feel much better. However, the sages found it boring to cut the pie into equal pieces, so they took a more challenging path. The first sage takes 1/k1-th part of the whole pie, the second 1/k2-th, the third 1/k3-th and so on. Here, the numbers k1, k2, k3, … kn are different positive integers not exceeding 100 (even the wisest sage is unable to precisely cut off less than 1/100 of a pie).

Your task is to write a program that will split the pie in such a way that each sage gets 1/ki-th of the whole pie (the pie must be shared without remainder!), or report that it is impossible to split the pie under these conditions. In case of several possible solutions, any of them will be considered correct.

Limitations

1 £ n £ 20;

k1, k2, …, kn are positive integer numbers, 1 £ ki £ 100;

1/k1 + 1/k2 + 1/k3 + … + 1/kn = 1;

ki kj, for any i, j, ij.

Input

The input file contains a single integer n, the number of sages sharing the pie.

Output

The output file should contain n space-delimited integers k1, k2, …, kn. If there is no solution then the output file should contain the message “No solution” (without quotation marks).

Example

Input

Output

3

2 3 6

2

No solution

1

1

4

2 4 6 12

 


View Problem Statistics Submit Problem discussion Author/source:
Problems from Contests and Camps / World Championship in Programming (ICPC) / Rybinsk-2014 /
1329. E - 4x4 1330. 1331. G - Bus Conductor 1332. H - Cryptography 1333. I - Belt Drive
time generating 0.11 sec.
© Copyright VSU, AVT, Nosov D.A., Andrianov I.A.