#include <bits/stdc++.h>
using namespace std;
long long in() {
  int32_t x;
  scanf("%d", &x);
  return x;
}
inline long long lin() {
  long long x;
  scanf("%lld", &x);
  return x;
}
inline void read(long long *a, long long n) {
  for (long long i = 0; i < n; i++) a[i] = in();
}
inline void readL(long long *a, long long n) {
  for (long long i = 0; i < n; i++) a[i] = lin();
}
const long long maxn = 1e6 + 10;
const long long mod = 1e9 + 7;
const long long MAX_VAL = 1e18 + 10;
int32_t main() {
  long long n = in();
  string s;
  cin >> s;
  long long cc = 0;
  for (long long i = 0; i + 1 < n; i++)
    if (s[i] != '?' && s[i + 1] == s[i]) return cout << "No\n", 0;
  for (long long i = 0; i < n; i++) {
    if (s[i] != '?') continue;
    if (i == 0 || i == n - 1 ||
        (s[i - 1] == s[i + 1] || s[i + 1] == '?' || s[i - 1] == '?'))
      cc++;
  }
  if (cc) return cout << "Yes\n", 0;
  cout << "No\n";
}
