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