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