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