#include <bits/stdc++.h>
using namespace std;
const int Max = 2e6 + 10;
const int Mod = 1e9 + 7;
const long long int Inf = 1LL << 62;
int dx[] = {0, 0, -1, 1};
int dy[] = {1, -1, 0, 0};
int dx8[] = {1, 1, 1, 0, 0, -1, -1, -1};
int dy8[] = {1, 0, -1, 1, -1, 1, 0, -1};
int main() {
  long long int n, m, k, q, t, cnt = 0, sum = 0, mx = -Inf, mn = Inf;
  scanf("%lld", &n);
  string str;
  cin >> str;
  for (char ch : str) {
    if (ch == '?') cnt++;
  }
  if (cnt == 0)
    printf("No\n");
  else {
    for (int i = 0; i < n - 1; i++) {
      if (str[i] == '?' || str[i + 1] == '?') {
        continue;
      }
      if (str[i] == str[i + 1]) {
        printf("No\n");
        return 0;
      }
    }
    for (int i = 0; i < n; i++) {
      if (str[i] == '?') {
        if (i == 0 || i == n - 1) {
          printf("Yes\n");
          return 0;
        } else if (str[i - 1] == str[i + 1] || str[i - 1] == '?' ||
                   str[i + 1] == '?') {
          printf("Yes\n");
          return 0;
        }
      }
    }
    printf("No\n");
  }
  return 0;
}
