#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  int n;
  cin >> n;
  string str;
  cin >> str;
  int len = str.length();
  bool check = false;
  for (int i = 0; i < len - 1; ++i) {
    if (str[i] == str[i + 1] && str[i] != '?') check = true;
  }
  if (check) {
    cout << "No";
    return 0;
  }
  for (int i = 0; i < len - 1; ++i) {
    if (str[i] == '?' && str[i + 1] == '?') {
      cout << "Yes";
      return 0;
    }
  }
  for (int i = 0; i < len; ++i) {
    if (i == 0) {
      if (str[i] == '?') {
        cout << "Yes";
        return 0;
      }
    } else if (i == len - 1) {
      if (str[i] == '?') {
        cout << "Yes";
        return 0;
      }
    } else {
      if (str[i] == '?') {
        if (str[i - 1] == str[i + 1]) {
          cout << "Yes";
          return 0;
        }
      }
    }
  }
  cout << "No";
  return 0;
}
