#include <bits/stdc++.h>
using namespace std;
bool DBG = false;
const int INF = 1000 * 1000 * 1000;
int main() {
  ios_base::sync_with_stdio(false);
  int n, k;
  cin >> n >> k;
  vector<int> a(n + 1, INF);
  int questions = 0;
  for (int i = 0; i < (int)(n + 1); ++i) {
    string s;
    cin >> s;
    if (s == "?") {
      ++questions;
    } else {
      a[i] = stoi(s);
    }
  }
  bool human_win;
  int numbers = n + 1 - questions;
  bool is_human_first = (numbers % 2 != 0);
  if (k == 0) {
    if (a[0] == INF) {
      human_win = is_human_first;
    } else {
      human_win = a[0] == 0;
    }
  } else {
    if (questions > 0) {
      human_win = questions % 2 == 0 ? !is_human_first : is_human_first;
    } else {
      bool is_root = true;
      if (k == 0) {
        is_root = (a[0] == 0);
      } else {
        for (int i = 0; i < (int)(n); ++i) {
          if (a[i] % k != 0) {
            is_root = false;
            break;
          }
          a[i + 1] += a[i] / k;
        }
        if (is_root) {
          is_root = (a[n] == 0);
        }
      }
      human_win = is_root;
    }
  }
  cout << (human_win ? "Yes" : "No") << endl;
  return 0;
}
