#include <bits/stdc++.h>
using namespace std;
int n;
string s;
int main(void) {
  ios_base::sync_with_stdio(false);
  ;
  cin >> n >> s;
  s = "#" + s;
  bool ok = 0;
  for (int i = 2; i <= n - 1; i++) {
    if (s[i] == '?' and s[i + 1] == '?') ok = 1;
    if (s[i] == '?' and s[i - 1] == s[i + 1]) ok = 1;
  }
  if (s[1] == '?' or s[n] == '?') ok = 1;
  for (int i = 1; i <= n - 1; i++) {
    if (s[i] == s[i + 1] and s[i] != '?') ok = 0;
  }
  if (ok) {
    cout << "Yes"
         << "\n";
  } else {
    cout << "No"
         << "\n";
  }
  return 0;
}
