#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(0);
  long long n, m;
  cin >> n;
  string str;
  cin >> str;
  bool r = false;
  bool e = false;
  for (int i = 0; i < str.size(); i++) {
    if (i != 0 && str[i - 1] == str[i] && str[i] != '?') {
      cout << "No";
      return 0;
    }
    if (str[i] == '?') {
      if (i == 0 || i == n - 1 || str[i - 1] == str[i + 1] ||
          str[i - 1] == '?' || str[i + 1] == '?') {
        e = true;
      }
    }
  }
  if (e)
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
