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