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