ICONS
시간 제한: 1000ms메모리 제한: 128MB출처: CHC 2001 Regional Competition - JuniorsBOJ 3276
문제
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.
예제
예제 1
입력
2
출력
1 2
예제 2
입력
5
출력
3 2
예제 3
입력
14
출력
4 4
코드를 제출하려면 로그인하세요.