#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  char x[] = {'C', 'M', 'Y'};
  string s, s1 = "";
  cin >> n >> s;
  s1 = s;
  n = s.size();
  for (int i = 1; i < n; i++) {
    if (s[i] != '?') {
      if (s[i - 1] == s[i]) {
        return cout << "No\n", 0;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    if (s[i] == '?') {
      for (int j = 0; j < 3; j++) {
        if (s[i - 1] != x[j] && s[i + 1] != x[j]) {
          s[i] = x[j];
          break;
        }
      }
    }
  }
  for (int i = 0; i < n; i++) {
    if (s1[i] == '?') {
      for (int j = 0; j < 3; j++) {
        if (s1[i - 1] != x[j] && s1[i + 1] != x[j]) {
          s1[i] = x[j];
        }
      }
    }
  }
  if (s != s1)
    cout << "Yes\n";
  else
    cout << "No\n";
  return 0;
}
