Unique Quotients

아직 제출이 없습니다시간 제한1초메모리 제한1024 MB

문제

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.