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