For this Question: You are given two integers N and M (N > M). You have to find the smallest integer <b>X</b> such that <i>N - M <= X <= N + M</i> and <i>M - X <= X - N</i>First and the only line of the input contains two integers N and M.

Constraints:
1 <= N < M <= 10<sup>9</sup>Find and print the smallest integer X which satisifes the above condition. If no such integer exists, print -1.Sample Input:
8 4

Sample Output:
6

Explaination:
6 is the smallest integer X between <b>N - M</b> (8 - 4 = 4) and <b>N + M</b> (8 + 4 = 12) such that M - X <= X - N., I have written this Solution Code: #include<bits/stdc++.h>
using namespace std;

#define fast ios_base::sync_with_stdio(false); cin.tie(NULL);
#define int long long
#define pb push_back
#define ff first
#define ss second
#define endl '\n'
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
using T = pair<int, int>;
typedef long long ll;
const int mod = 1e9 + 7;
const int INF = 1e9;


void solve() {
	int n, m;
    cin >> n >> m;
    int y = (n + m + 1)/2;
    cout << y;
}

signed main(){
    fast
    int t = 1;
    // cin >> t;
    for(int i = 1; i <= t; i++){
        solve();
        if(i != t) cout << endl;
    }
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?