#include <bits/stdc++.h>
using namespace std;
int n;
char s[110];
int main() {
  scanf("%d", &n);
  scanf("%s", s + 1);
  for (int i = 2; i <= n; ++i)
    if (s[i] != '?' && s[i] == s[i - 1]) {
      printf("No\n");
      return 0;
    }
  for (int i = 2; i <= n; ++i)
    if (s[i] == '?' && s[i] == s[i - 1]) {
      printf("Yes\n");
      return 0;
    }
  for (int i = 2; i < n; ++i) {
    if (s[i] == '?' && s[i - 1] == s[i + 1]) {
      printf("Yes\n");
      return 0;
    }
  }
  if (s[1] == '?' || s[n] == '?')
    printf("Yes\n");
  else
    printf("No\n");
  return 0;
}
