#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int n;
  cin >> n;
  char ch[n + 1];
  cin >> ch;
  int count = 0;
  if (ch[0] == '?') {
    count += 2;
  }
  if (ch[n - 1] == '?') {
    count += 2;
  }
  for (int i = 1; i < n; i++) {
    if (ch[i] == '?') {
      if (ch[i - 1] == ch[i + 1]) {
        count += 2;
      }
      if (ch[i - 1] == ch[i]) {
        count += 2;
      }
    } else {
      if (ch[i] == ch[i - 1]) {
        count = 0;
        break;
      }
    }
  }
  if (count >= 2) {
    cout << "Yes" << endl;
    return 0;
  }
  cout << "No" << endl;
  return 0;
}
