#include <bits/stdc++.h>
using namespace std;
int Set(int n, int pos) { return n = n | (1 << pos); }
int reset(int n, int pos) { return n = n & ~(1 << pos); }
bool check(int n, int pos) { return (bool)(n & (1 << pos)); }
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
};
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); };
int ara[100005];
string s;
int main() {
  int n;
  scanf("%d", &n);
  cin >> s;
  int ways = 0;
  for (int i = 0; i < n && n > 1; i++) {
    if (s[i] == s[i - 1] && s[i] != '?') {
      cout << "No" << endl;
      return 0;
    }
  }
  for (int i = 0; i < n; i++) {
    if (s[i] == '?' && s[i + 1] == '?') {
      cout << "Yes" << endl;
      return 0;
    }
    if (s[i] == '?') {
      if (i == 0 || i == n - 1 || (i > 0 && s[i - 1] == s[i + 1])) {
        cout << "Yes" << endl;
        return 0;
      }
    }
  }
  cout << "No" << endl;
}
