시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 128 MB | 753 | 569 | 544 | 76.512% |
Dave has a collection of N interesting pebbles. He wishes to arrange them in rows and columns in such a way that the sum of number of rows and number of columns needed is minimal possible. Write a program that will help Dave to find such numbers.
The first and only line of input file contains a natural number N (1 ≤ N ≤ 100), the number of pebbles to be arranged. Arrangement needs not to be regular in any sense – some places in a row may be empty.
The first and only line of output file must contain number of rows and number of columns separated by one space.
Note: A solution needs not to be unique.
2
1 2
5
3 2
14
4 4