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: #include <bits/stdc++.h>
#define int long long
#define endl '\n'
using namespace std;
 
typedef long long ll;
typedef long double ld;
#define db(x) cerr << #x << ": " << x << '\n';
#define read(a) int a; cin >> a;
#define reads(s) string s; cin >> s;
#define readb(a, b) int a, b; cin >> a >> b;
#define readc(a, b, c) int a, b, c; cin >> a >> b >> c;
#define readarr(a, n) int a[(n) + 1] = {}; FOR(i, 1, (n)) {cin >> a[i];}
#define readmat(a, n, m) int a[n + 1][m + 1] = {}; FOR(i, 1, n) {FOR(j, 1, m) cin >> a[i][j];}

#define print(a) cout << a << endl;
#define printarr(a, n) FOR (i, 1, n) cout << a[i] << " "; cout << endl;
#define printv(v) for (int i: v) cout << i << " "; cout << endl;
#define printmat(a, n, m) FOR (i, 1, n) {FOR (j, 1, m) cout << a[i][j] << " "; cout << endl;}
#define all(v) v.begin(), v.end()
#define sz(v) (int)(v.size())
#define rz(v, n) v.resize((n) + 1);
#define pb push_back
#define fi first
#define se second
#define vi vector <int>
#define pi pair <int, int>
#define vpi vector <pi>
#define vvi vector <vi>
#define setprec cout << fixed << showpoint << setprecision(20);
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define FORD(i, a, b) for (int i = (a); i >= (b); i--)
const ll inf = 1e18;
const ll mod = 1e9 + 7;
//const ll mod = 998244353;
const ll N = 1e5 + 1;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

int power (int a, int b = mod - 2)
{
    int res = 1;
    while (b > 0) {
        if (b & 1)
            res = res * a % mod;
        a = a * a % mod;
        b >>= 1;
    }
    return res;
}

signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    
    vi divisor(N + 1);
    readb(n, r);
    FORD (i, r, 1)
    {
        for (int j = i; j <= N; j += i)
            if (!divisor[j]) divisor[j] = i;
    }

    readarr(a, n);
    int pre[n + 1] = {}, suf[n + 2] = {};
    FOR (i, 1, n) pre[i] = __gcd(pre[i - 1], a[i]);
    FORD (i, n, 1) suf[i] = __gcd(suf[i + 1], a[i]);
    
    int ans = pre[n];
    FOR (i, 1, n)
    {
        int x = __gcd(pre[i - 1], suf[i + 1]);
        ans = max(ans, divisor[x]);
    }
    
    print(ans);
}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?