#include <bits/stdc++.h>
using namespace std;
__attribute__((constructor)) void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}
int main() {
  int n;
  cin >> n;
  int f = 0;
  string s;
  cin >> s;
  for (int i = (1); i < (n); i++) {
    if (s[i] != '?' && s[i - 1] != '?' && s[i] == s[i - 1]) {
      cout << "No" << endl;
      return 0;
    }
  }
  for (int i = (1); i < (n); i++) {
    if (s[i] == s[i - 1] && s[i] == '?') {
      cout << "Yes" << endl;
      return 0;
    }
  }
  for (int i = (0); i < (n); i++) {
    if (s[i] == '?') {
      if (i == 0 || i == n - 1) {
        cout << "Yes" << endl;
        return 0;
      } else {
        if (s[i - 1] == s[i + 1]) {
          cout << "Yes" << endl;
          return 0;
        }
      }
    }
  }
  cout << "No" << endl;
}
