#include <bits/stdc++.h>
int main() {
  static int aa[100000 + 1];
  static char s[16];
  int n, k, i, a0_undefined, aa_undefined, yes;
  scanf("%d%d", &n, &k);
  a0_undefined = 0;
  aa_undefined = 0;
  for (i = 0; i <= n; i++) {
    scanf("%s", s);
    if (s[0] == '?') {
      aa_undefined++;
      if (i == 0) a0_undefined = 1;
    } else
      aa[i] = atoi(s);
  }
  yes = 0;
  if (aa_undefined != 0) {
    if (k == 0) {
      if (a0_undefined)
        yes = (n + 1 - aa_undefined) % 2 == 1;
      else
        yes = aa[0] == 0;
    } else
      yes = (n + 1) % 2 == 0;
  } else {
    if (k == 0)
      yes = aa[0] == 0;
    else {
      yes = 1;
      for (i = 0; i < n; i++) {
        if (aa[i] % k != 0) {
          yes = 0;
          break;
        }
        aa[i + 1] += aa[i] / k;
      }
      if (yes) yes = aa[n] == 0;
    }
  }
  printf(yes ? "Yes\n" : "No\n");
  return 0;
}
