#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  string s1("CMY");
  int a[n];
  cin >> s;
  int c = 1, t = 0, q = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '?') {
      t++;
      for (int j = 0; j < s1.size(); j++) {
        s[i] = s1[j];
        if (s[i] != s[i - 1] && s[i] != s[i + 1]) {
          i != 0 && i != s.size() - 1 && s[i - 1] != s[i + 1] &&
                  s[i - 1] != '?' && s[i + 1] != '?'
              ? q++
              : q = q;
          break;
        }
      }
    }
    s[i] != s[i + 1] ? c++ : c = c;
  }
  if (c - 1 == s.size() && t > 0 && t != q) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
