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