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