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