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