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