시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB131886064.516%

문제

The letters A..J each represent a different single digit from the set [0..9]. Find all solutions to the quotient of two five digit numbers:

ABCDE / FGHIJ = 9

Note: leading zeros are allowed, i.e., F could be 0.

입력

A single integer N that specifies which solution of the set to print.

출력

Print the two integers that represent ABCDE and FGHIJ with a space between them on a line. Print only the Nth solution from the set of solutions ordered numerically smallest ABCDE first.

예제 입력 1

1

예제 출력 1

57429 06381