#include <bits/stdc++.h>
const long long INF = 1e18;
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  string s;
  cin >> s;
  int err = 0;
  for (int i = 1; i < s.size(); ++i) {
    if (s[i] == s[i - 1] && s[i] != '?') {
      ++err;
    }
  }
  if (err > 0) {
    cout << "No";
    return 0;
  }
  for (int i = 1; i < s.size(); ++i) {
    if (s[i] == s[i - 1] && s[i] == '?') {
      ++err;
    }
  }
  if (err > 0) {
    cout << "Yes";
    return 0;
  }
  if (s.size() == 1 && s[0] != '?') {
    cout << "No";
    return 0;
  }
  if (s.size() == 1 && s[0] == '?') {
    cout << "Yes";
    return 0;
  }
  if (s[0] == '?' || s[s.size() - 1] == '?') {
    cout << "Yes";
    return 0;
  }
  for (int i = 1; i < s.size() - 1; ++i) {
    if (s[i] == '?') {
      if (s[i - 1] == s[i + 1]) {
        cout << "Yes";
        return 0;
      }
    }
  }
  cout << "No";
}
