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