#include <bits/stdc++.h>
int main() {
  int n;
  std::cin >> n;
  std::string str;
  std::cin >> str;
  if (n == 1 && str[0] != '?') {
    std::cout << "No\n";
    return 0;
  } else if (n == 2 && str[0] == str[1] && str[0] != '?') {
    std::cout << "No\n";
    return 0;
  }
  bool any = false;
  bool anyok = false;
  int cnt = 0;
  for (int i = 1; i < n - 1; ++i) {
    if (str[i] == '?') {
      any = true;
      ++cnt;
      if (str[i - 1] == '?' || str[i + 1] == '?')
        anyok = true;
      else if (str[i - 1] == str[i + 1])
        anyok = true;
    } else {
      if (str[i] == str[i - 1] || str[i] == str[i + 1]) {
        std::cout << "No\n";
        return 0;
      }
    }
  }
  if (str[0] == '?' || str[n - 1] == '?') {
    std::cout << "Yes\n";
    return 0;
  }
  if (!any || !anyok) {
    std::cout << "No\n";
    return 0;
  } else {
    std::cout << "Yes\n";
  }
}
