#include <bits/stdc++.h>
using namespace std;
int n, k;
int fir, sec, turn;
long long v[500001];
int sa[500001];
int f(string y) {
  int ret = 0;
  int neg = 0, sta = 0;
  if (y[sta] == '-') {
    neg = 1;
    sta++;
  }
  for (int i = sta; i < y.length(); i++) {
    ret = ret * 10 + (int)(y[i] - '0');
  }
  if (neg) ret *= -1;
  return ret;
}
int main() {
  scanf("%d%d", &n, &k);
  n++;
  turn = sec = 0;
  for (int i = 1; i <= n; i++) {
    sa[i] = 0;
    string x;
    cin >> x;
    if (x[0] == '?') {
      sec = 1;
      if (i == 1) fir = 1;
    } else {
      sa[i] = 1;
      v[i] = (long long)f(x);
      turn ^= 1;
    }
  }
  int res;
  if (k == 0) {
    if (sa[1] == 0) {
      res = turn;
    } else {
      res = (v[1] == 0 ? 1 : 0);
    }
  } else {
    if (!sec) {
      res = 1;
      long long a = 0;
      for (int i = 1; i <= n; i++) {
        if (v[i] % k) {
          res = 0;
          break;
        }
        v[i + 1] += v[i] / (long long)k;
      }
      if (v[n + 1] != 0) res = 0;
    } else
      res = (n % 2 == 0 ? 1 : 0);
  }
  if (res)
    puts("Yes");
  else
    puts("No");
}
