#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int n, i, x = 0;
  cin >> n;
  string second;
  cin >> second;
  vector<long long int> v;
  if (second.size() == 1 && second[0] == '?') return cout << "Yes", 0;
  for (i = 0; i < second.size(); ++i) {
    if (second[i] == '?') v.push_back(i);
    if (i != n - 1 && second[i] == second[i + 1] && second[i] != '?')
      return cout << "No", 0;
  }
  for (i = 0; i < v.size(); ++i) {
    if (v[i] == 0 || v[i] == second.size() - 1) return cout << "Yes", 0;
    if (i != v.size() - 1 && v[i] == v[i + 1] - 1) return cout << "Yes", 0;
  }
  for (i = 0; i < second.size(); ++i) {
    if (second[i] == '?') {
      if (i >= 0 && i < n - 1) {
        if (second[i - 1] == second[i + 1]) return cout << "Yes", 0;
      }
    }
  }
  cout << "No";
  return 0;
}
