#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  return x * f;
}
int n, cnt = 0;
char s[1010];
int main() {
  n = read();
  scanf("%s", s + 1);
  for (int i = 1; i < n; ++i)
    if (s[i] != '?' && s[i] == s[i + 1]) {
      puts("No");
      return 0;
    }
  for (int i = 1; i < n; ++i)
    if (s[i] == '?' && s[i] == s[i + 1]) {
      puts("Yes");
      return 0;
    }
  if (s[1] == '?' || s[n] == '?') {
    puts("Yes");
    return 0;
  }
  for (int i = 2; i < n; ++i)
    if (s[i] == '?' && s[i - 1] == s[i + 1]) {
      puts("Yes");
      return 0;
    }
  puts("No");
  return 0;
}
