#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
int n;
char s[101];
int main() {
  scanf("%d", &n);
  scanf("%s", s);
  bool p = true, q = false;
  int ct = 0;
  for (int i = 1; i < n; ++i)
    if (s[i] == s[i - 1] && s[i] != '?') {
      p = false;
      break;
    }
  for (int i = 1; i < n; ++i)
    if (s[i] == s[i - 1] && s[i] == '?') {
      q = 1;
      break;
    }
  q = q || s[0] == '?' || s[n - 1] == '?';
  if (!q) {
    for (int i = 1; i < n - 1; ++i)
      if (s[i] == '?' && s[i - 1] == s[i + 1] && s[i - 1] != '?') {
        q = 1;
        break;
      }
  }
  if (p && q)
    printf("Yes\n");
  else
    printf("No\n");
  return 0;
}
