#t288. 因子问题
因子问题
Factors Problem
Problem Background
Special for beginners, ^_^
Problem Description
Given two positive integers and , find the smallest positive integer such that both and are factors of .
Input Format
Two integers and . does not exceed .
Output Format
Output one integer as the result. If no positive integer satisfying the condition exists for a given case, output in the corresponding line.
Sample Input
35 10
Sample Output
5
Constraints
1s, 1024KiB for each test case.