문제
Once upon a time, you had a nice positive integer .
Since you like division, you quickly found all its positive integer divisors.
Not being a mean guy, you calculated --- the arithmetic mean of divisors of . Surprisingly, this number turned out to be an integer.
Some time passed, and you calculated --- the harmonic mean of divisors of . Even more surprisingly, this number turned out to be an integer, too!
Unfortunately, your memory let you down, and now you remember and but don't remember . However, you remember that didn't exceed .
Your muse suggested to bring good old times back and restore any value of matching your records.
입력
The first line of the input contains a single positive integer .
The second line of the input contains a single positive integer .
It's guaranteed that there exists a positive integer such that the arithmetic mean of divisors of is equal to , which the harmonic mean of divisors of is equal to .
힌트
The arithmetic mean is the sum of a collection of numbers divided by the number of numbers in the collection. For example, the arithmetic mean of 1, 2, 3 and 6 is equal to .
The harmonic mean is the reciprocal of the arithmetic mean of the reciprocals of numbers in the collection. For example, the harmonic mean of 1, 2, 3 and 6 is equal to .
Thus, in the first example test case, satisfies the requirements since its divisors are 1, 2, 3 and 6.