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