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