#include <bits/stdc++.h>
using namespace std;
char s[110];
int main() {
  int n;
  while (cin >> n) {
    cin >> s;
    int flag = 1;
    for (int i = 0; i < n - 1; i++) {
      if (s[i] == s[i + 1] && s[i] != '?') {
        cout << "No" << endl;
        flag = 0;
        break;
      }
    }
    if (flag) {
      int t = 0;
      if (s[0] == '?' || s[n - 1] == '?') t = 1;
      for (int i = 1; i < n - 1; i++) {
        if (s[i] == '?' && s[i - 1] == s[i + 1]) t = 1;
        if (s[i] == s[i + 1] && s[i] == '?') t = 1;
      }
      if (t)
        cout << "Yes" << endl;
      else
        cout << "No" << endl;
    }
  }
  return 0;
}
