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