You are given two positive numbers A and B. You need to find the maximum valued integer X such that:Problem Constraints
X divides A i.e. A % X = 0
X and B are co-prime i.e. gcd(X, B) = 1
A = 30
B = 12
X = 5
First argument is A.Output Format
Second argument is B.
Find the maximum valued integer X which satisfies the above properties.
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified.
Still have a question? Checkout Sample Codes for more details.