#include <bits/stdc++.h>
const int mo = 1000000007;
const int inf = 0x3f3f3f3f;
double pi = 3.14159265358979323846;
double e = 2.71828182845904523536;
using namespace std;
int main() {
  int n;
  int flag = 0;
  char a[1005];
  cin >> n;
  cin >> a;
  for (int i = 0; i < n; i++) {
    if (i + 1 < n && a[i] != '?' && a[i] == a[i + 1]) {
      flag = 1;
      break;
    }
    if (i + 1 < n && a[i] == '?' && a[i + 1] == '?') {
      flag = 2;
    }
  }
  if (flag == 1)
    cout << "No" << endl;
  else if (flag == 2)
    cout << "Yes" << endl;
  else {
    for (int i = 0; i < n; i++) {
      if (i == 0 && a[i] == '?')
        flag = 1;
      else if (i == n - 1 && a[i] == '?')
        flag = 1;
      else if (i + 1 < n && a[i] == '?' && a[i - 1] == a[i + 1]) {
        flag = 1;
        break;
      }
    }
    if (flag == 1) {
      cout << "Yes" << endl;
    } else
      cout << "No" << endl;
  }
  return 0;
}
