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