#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
const int N = 10;
int n, k;
int a[MAXN];
bool mask[MAXN];
bool f() {
  for (int i = 0; i < n; i++) {
    if (a[i] % k != 0) return false;
    a[i + 1] += a[i] / k;
  }
  return a[n] == 0;
}
int main() {
  int cnt = 0;
  string s;
  cin >> n >> k;
  for (int i = 0; i <= n; i++) {
    cin >> s;
    mask[i] = (s[0] != '?');
    cnt += mask[i];
    if (mask[i]) sscanf(s.c_str(), "%d", &a[i]);
  }
  bool answ;
  if (k == 0) {
    if (mask[0])
      answ = (a[0] == 0);
    else
      answ = cnt & 1;
  } else if (cnt == n + 1) {
    answ = f();
  } else {
    answ = n & 1;
  }
  string text[2] = {"No", "Yes"};
  cout << text[answ] << endl;
}
