Given two numbers A and B, find the smallest prime number that divides both of them or state that such number does not exist.
Input
First and only line of input contains two integers A and B.
Output
Print the smallest common prime divisor of A and B or −1 if it does not exist.
Constraints
1≤A,B≤1015
3 is the smallest common prime factor of 3 and 6.