#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  bool tmp = true;
  for (int i = 0; i < s.size() - 1; ++i) {
    if (s[i] != '?') {
      tmp &= !(s[i] == s[i + 1]);
    }
  }
  if (tmp) {
    tmp = false;
    for (int i = 1; i < n - 1; ++i) {
      if (s[i] == '?') {
        if (s[i - 1] == s[i + 1] || s[i - 1] == '?' || s[i + 1] == '?') {
          tmp = true;
        }
      }
    }
    if (s[0] == '?' || s[n - 1] == '?') {
      tmp = true;
    }
    if (tmp) {
      cout << "Yes";
    } else {
      cout << "No";
    }
  } else {
    cout << "No";
  }
  return 0;
}
