For this Question: You are given a string S consisting of lowercase English letters. Determine whether adding some number of a's (possibly zero) at the beginning of S can make it a palindrome.The input consists of a single string S.

Constraints
1 &le; ∣S∣ &le; 10^6
S consists of lowercase English letters.If adding some number of a's (possibly zero) at the beginning of S can make it a palindrome, print Yes; otherwise, print No.<b>Sample Input 1</b> 
kasaka
<b>Sample Output 1</b>
Yes

<b>Sample Input 2</b>
reveh
<b>Sample Output 2</b>
No, I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;
int main(void) {
	int n, x, y;
	string a;
	cin >> a;
	n = a.size();
	x = 0;
	for (int i = 0; i < n; i++) {
		if (a[i] == 'a')x++;
		else break;
	}
	y = 0;
	for (int i = n - 1; i >= 0; i--) {
		if (a[i] == 'a')y++;
		else break;
	}
	if (x == n) {
		cout << "Yes" << endl;
		return 0;
	}
	if (x > y) {
		cout << "No" << endl;
		return 0;
	}
	for (int i = x; i < (n - y); i++) {
		if (a[i] != a[x + n - y - i - 1]) {
			cout << "No" << endl;
			return 0;
		}
	}
	cout << "Yes" << endl;
	return 0;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?