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