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