#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v;
  string str;
  cin >> str;
  bool p = true;
  for (int i = 0; i < str.size(); i++) {
    if (str[i] == '?')
      v.push_back(i);
    else if (i < str.size() - 1) {
      if (str[i] == str[i + 1]) {
        p = false;
        break;
      }
    }
  }
  if (p == false) {
    cout << "NO\n";
    return 0;
  }
  bool is = false;
  for (int i = 0; i < v.size(); i++) {
    if (v[i] == 0 || v[i] == str.size() - 1) {
      is = true;
      break;
    } else if (str[v[i] - 1] == str[v[i] + 1]) {
      {
        is = true;
        break;
      }
    } else if (i < v.size() - 1) {
      if (v[i + 1] == v[i] + 1) {
        is = true;
        break;
      }
    }
  }
  if (is)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
