시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB77533678.261%

문제

Consider a natural number N and the expression HN = 1 + 1/2 + 1/3 + ... + 1/N

Determine the natural numbers, the numerator P and the denominator Q of the irreducible fraction HN = P/Q.

입력

The standard input contains on the first line the number N.

출력

The standard output will contain on the first line the number P and on the second line the number Q.

제한

  • 2 ≤ N ≤ 10000

서브태스크

번호배점제한
133

2 ≤ N ≤ 36

230

37 ≤ N ≤ 1512

318

1513 ≤ N ≤ 4003

419

4004 ≤ N ≤ 10000

예제 입력 1

6

예제 출력 1

49
20

예제 입력 2

20

예제 출력 2

55835135
15519504

예제 입력 3

47

예제 출력 3

280682601097106968469
63245806209101973600

채점 및 기타 정보

  • 예제는 채점하지 않는다.