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