#include <bits/stdc++.h>
using namespace std;
bool isPrime(int n) {
  if (n == 1) return false;
  if (n == 2) return true;
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
int GCD(int a, int b) {
  if (!b) return a;
  return GCD(b, a % b);
}
int LCM(int a, int b) { return (a * b) / GCD(a, b); }
void solve() {
  int n, q = 0, i;
  string s;
  cin >> n >> s;
  if (s[0] == '?') q = 1;
  for (i = 1; i < n; i++) {
    if (s[i - 1] == '?' && s[i] == '?') {
      q = 2;
    } else if (s[i] == s[i - 1]) {
      cout << "No";
      return;
    }
    if (i > 1 && s[i - 1] == '?' && s[i] == s[i - 2]) {
      q = 3;
    }
  }
  cout << (s[i - 1] == '?' || q > 0 ? "Yes" : "No");
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
