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