#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  char a[n];
  cin >> a;
  int test = 0;
  int i;
  for (i = 0; i < n - 1; i++)
    if (a[i] == a[i + 1] && a[i] == '?') test = 1;
  if (a[0] == '?' || a[n - 1] == '?') test = 1;
  for (i = 0; i < n - 2; i++)
    if (a[i + 1] == '?' && a[i] != '?' && a[i] == a[i + 2]) test = 1;
  for (i = 0; i < n - 1; i++)
    if (a[i] == a[i + 1] && a[i] != '?') test = 0;
  if (test == 1)
    cout << "Yes";
  else
    cout << "No";
}
