#include <bits/stdc++.h>
using namespace std;
string s;
int n;
int main() {
  cin >> n;
  cin >> s;
  int cou = 0;
  for (int i = 0; i < (int)s.size() - 1; i++) {
    if (s[i] == s[i + 1] && s[i] != '?') {
      printf("No");
      return 0;
    }
  }
  for (int i = 1; i < (int)s.size() - 1; i++) {
    if (s[i] == s[i - 1] && s[i] == '?') {
      printf("Yes");
      return 0;
    } else if (s[i] == '?' && s[i - 1] == s[i + 1]) {
      printf("Yes");
      return 0;
    }
  }
  if (s[0] == '?' || s[s.size() - 1] == '?') {
    printf("Yes");
  } else {
    printf("No");
  }
}
