#include <bits/stdc++.h>
using namespace std;
int n;
string s;
int dp[105][4];
int Read(char c) {
  if (c == 'C') return 0;
  if (c == 'Y') return 1;
  return 2;
}
int calc(int p, int last) {
  if (dp[p][last] != -1) return dp[p][last];
  if (p >= n) return 1;
  if (s[p] != '?') {
    if (Read(s[p]) == last) return dp[p][last] = 0;
    return dp[p][last] = calc(p + 1, Read(s[p]));
  }
  dp[p][last] = 0;
  for (int i = 0; i < 3; i++)
    if (i != last) dp[p][last] += calc(p + 1, i);
  return dp[p][last] = min(3, dp[p][last]);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  cin >> s;
  memset(dp, -1, sizeof dp);
  cout << (calc(0, 3) >= 2 ? "Yes" : "No") << endl;
  return 0;
}
