Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i=0; i<n; ++i)
#define rep1(i, n) for (int i=1; i<=n; ++i)
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
constexpr ll  MOD = (1e9+7);
constexpr int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
constexpr int lcm(int a, int b) { return a / gcd(a, b) * b; }

template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
ll factorial(ll n, ll m=2) {
    // calculate n!
    m = max(2LL, m);
    ll rtn = 1;
    for (ll i=m; i<=n; i++) {
        rtn = (rtn * i) % MOD;
    }
    return rtn;
}
ll modinv(ll a, ll m) {
    ll b = m, u = 1, v = 0;
    while (b) {
        ll t = a / b;
        a -= t * b;
        swap(a, b);
        u -= t * v;
        swap(u, v);
    }
    u %= m;
    if (u < 0) u += m;
    return u;
}
ll modpow(ll a, ll n) {
    ll res = 1;
    while (n > 0) {
        if (n & 1)
            res = res * a % MOD;
        a = a * a % MOD;
        n >>= 1;
    }
    return res;
}

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    string s; cin >> s;
    string rs; rs = s; reverse(ALL(rs));
    if (!(s == rs)) { puts("No"); return 0; }
    int i = 0, j = (s.size()-1)/2-1;
    while (i<j) {
        cerr << s[i] << " " << s[j] << endl;
        if (!(s[i++] == s[j--])) {
            puts("No");
            return 0;
        }
    }
    int k = (s.size()+3)/2-1, l=s.size()-1;
    while (k<l) {
        cerr << s[k] << " " << s[l] << endl;
        if (!(s[k++] == s[l--])) {
            puts("No");
            return 0;
        }
    }
    puts("Yes");
    return 0;
}#include <bits/stdc++.h>
#define rep(i, n) for (int i=0; i<n; ++i)
#define rep1(i, n) for (int i=1; i<=n; ++i)
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
constexpr ll  MOD = (1e9+7);
constexpr int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
constexpr int lcm(int a, int b) { return a / gcd(a, b) * b; }

template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
ll factorial(ll n, ll m=2) {
    // calculate n!
    m = max(2LL, m);
    ll rtn = 1;
    for (ll i=m; i<=n; i++) {
        rtn = (rtn * i) % MOD;
    }
    return rtn;
}
ll modinv(ll a, ll m) {
    ll b = m, u = 1, v = 0;
    while (b) {
        ll t = a / b;
        a -= t * b;
        swap(a, b);
        u -= t * v;
        swap(u, v);
    }
    u %= m;
    if (u < 0) u += m;
    return u;
}
ll modpow(ll a, ll n) {
    ll res = 1;
    while (n > 0) {
        if (n & 1)
            res = res * a % MOD;
        a = a * a % MOD;
        n >>= 1;
    }
    return res;
}

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    string s; cin >> s;
    string rs; rs = s; reverse(ALL(rs));
    if (!(s == rs)) { puts("No"); return 0; }
    int i = 0, j = (s.size()-1)/2-1;
    while (i<j) {
        cerr << s[i] << " " << s[j] << endl;
        if (!(s[i++] == s[j--])) {
            puts("No");
            return 0;
        }
    }
    int k = (s.size()+3)/2-1, l=s.size()-1;
    while (k<l) {
        cerr << s[k] << " " << s[l] << endl;
        if (!(s[k++] == s[l--])) {
            puts("No");
            return 0;
        }
    }
    puts("Yes");
    return 0;
}

Compiler output:
a.cc:87:2: error: stray '#' in program
   87 | }#include <bits/stdc++.h>
      |  ^
a.cc:87:3: error: 'include' does not name a type
   87 | }#include <bits/stdc++.h>
      |   ^~~~~~~
a.cc:98:15: error: redefinition of 'constexpr const ll MOD'
   98 | constexpr ll  MOD = (1e9+7);
      |               ^~~
a.cc:12:15: note: 'constexpr const ll MOD' previously defined here
   12 | constexpr ll  MOD = (1e9+7);
      |               ^~~
a.cc:99:15: error: redefinition of 'constexpr int gcd(int, int)'
   99 | constexpr int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
      |               ^~~
a.cc:13:15: note: 'constexpr int gcd(int, int)' previously defined here
   13 | constexpr int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
      |               ^~~
a.cc:100:15: error: redefinition of 'constexpr int lcm(int, int)'
  100 | constexpr int lcm(int a, int b) { return a / gcd(a, b) * b; }
      |               ^~~
a.cc:14:15: note: 'constexpr int lcm(int, int)' previously defined here
   14 | constexpr int lcm(int a, int b) { return a / gcd(a, b) * b; }
      |               ^~~
a.cc:102:31: error: redefinition of 'template<class T> bool chmin(T&, T)'
  102 | template<class T> inline bool chmin(T& a, T b) {
      |                               ^~~~~
a.cc:16:31: note: 'template<class T> bool chmin(T&, T)' previously declared here
   16 | template<class T> inline bool chmin(T& a, T b) {
      |                               ^~~~~
a.cc:109:31: error: redefinition of 'template<class T> bool chmax(T&, T)'
  109 | template<class T> inline bool chmax(T& a, T b) {
      |                               ^~~~~
a.cc:23:31: note: 'template<class T> bool chmax(T&, T)' previously declared here
   23 | template<class T> inline bool chmax(T& a, T b) {
      |                               ^~~~~
a.cc:116:4: error: redefinition of 'll factorial(ll, ll)'
  116 | ll factorial(ll n, ll m=2) {
      |    ^~~~~~~~~
a.cc:30:4: note: 'll factorial(ll, ll)' previously defined here
   30 | ll factorial(ll n, ll m=2) {
      |    ^~~~~~~~~
a.cc:125:4: error: redefinition of 'll modinv(ll, ll)'
  125 | ll modinv(ll a, ll m) {
      |    ^~~~~~
a.cc:39:4: note: 'll modinv(ll, ll)' previously defined here
   39 | ll modinv(ll a, ll m) {
      |    ^~~~~~
a.cc:138:4: error: redefinition of 'll modpow(ll, ll)'
  138 | ll modpow(ll a, ll n) {
      |    ^~~~~~
a.cc:52:4: note: 'll modpow(ll, ll)' previously defined here
   52 | ll modpow(ll a, ll n) {
      |    ^~~~~~
a.cc:149:5: error: redefinition of 'int main()'
  149 | int main() {
      |     ^~~~
a.cc:63:5: note: 'int main()' previously defined here
   63 | int main() {
      |     ^~~~