For this Question: It is a moment of triumph in Stepstones, as they have captured all the ships from Westeros. To celebrate this occasion, they have prepared a problem for you to solve:

You are given an integer R, and an array A consisting of positive integers. You can do this operation at most once (possibly zero times):
• Choose any element of the array. Replace it with any integer X, such that 1 ≤ X ≤ R.

Find the maximum possible GCD of the entire array.The first line consists of two space-separated integers N and R.
The second line consists of N space-separated integers – A<sub>1</sub>, A<sub>2</sub> ... A<sub>N</sub>.

<b>Constraints:</b>
2 ≤ N ≤ 10<sup>5</sup>
1 ≤ R ≤ 10<sup>5</sup>
1 ≤ A<sub>i</sub> ≤ 10<sup>5</sup>Print a single integer – the maximum possible GCD of the array.Sample Input 1:
3 10
2 3 4

Sample Output 1:
2

Sample Explanation 1:
We can change the second element from 3 to 2. Then the GCD of the array becomes gcd(2, 2, 4) = 2, which is the maximum possible.

Sample Input 2:
2 3
10 15

Sample Output 2:
5

Sample Explanation 2:
We do need to perform any operation. The GCD of the array is gcd(10, 15) = 5, which is the maximum possible.

Sample Input 3:
3 5
11 6 12

Sample Output 3:
3

Sample Explanation 3:
We can change the first element from 11 to 3. Then the GCD of the array becomes gcd(3, 6, 12) = 3, which is the maximum possible., I have written this Solution Code: def find_gcd(x, y): 
    while(y):
        x, y = y, x % y
    return x
nr = list(map(int,input().split()))
n = nr[0]
r = nr[1]
_ = list(map(int,input().split()))
num1 = _[0]
num2 = _[1]
gcd = find_gcd(num1, num2)
for i in range(2,n):
    gcd = find_gcd(gcd, _[i])
if gcd>=r:
    print(gcd)
else:
    while r:
        num = 0
        idx = None
        for i in range(n):
            if _[i]%r != 0:
                num += 1
                idx = i
            if num > 1:
                break
        if idx!= None:
            temp = _[idx]
        if num == 1:
            _[idx] = r
            num1 = _[0]
            num2 = _[1]
            tgcd = find_gcd(num1, num2)
            for i in range(2,n):
                tgcd = find_gcd(tgcd, _[i])
            gcd = max(tgcd,gcd)
            _[idx] = temp
            break
        r -= 1
    print(gcd), In this Programming Language: Python, Now tell me if this Code is compilable or not?