|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초||128 MB||1||1||1||100.000%|
The form of a natural number a in a number system with base p contains of n ones (digts "1") in a row.
Your task is to write a program that computes the greatest values of exponents of numbers 2 and 3 such that the remainder of a divided by both these values the remainder is 0.
Two values of natural numbers p (1 < p < 109) and n (n < 109) are input from the keyboard.
Two non-negative integer numbers must be output on the screen: the values of the greatest exponents of two and three.