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