#include <bits/stdc++.h>
const int maxn = 1e5 + 10;
const int dis[4][2] = {{0, 1}, {-1, 0}, {0, -1}, {1, 0}};
using namespace std;
long long gcd(long long p, long long q) { return q == 0 ? p : gcd(q, p % q); }
long long qpow(long long p, long long q, long long mo) {
  long long f = 1;
  while (q) {
    if (q & 1) f = f * p % mo;
    p = p * p % mo;
    q >>= 1;
  }
  return f;
}
int a[maxn];
char b[maxn];
int main() {
  int i, j, m, n, k, t;
  scanf("%d%d", &n, &k);
  int cnt = 0;
  for (i = 0; i <= n; i++) {
    scanf("%s", b);
    if (b[0] != '?')
      cnt++, sscanf(b, "%d", &a[i]);
    else
      a[i] = 0x3f3f3f3f;
  }
  if (k == 0) {
    if ((a[0] == 0x3f3f3f3f && cnt & 1) || a[0] == 0)
      puts("Yes");
    else
      puts("No");
  } else {
    if (cnt < n + 1) {
      if (n & 1)
        puts("Yes");
      else
        puts("No");
    } else {
      long long f = 0;
      for (i = n; i >= 0 && abs(f) < 1e14; i--) f = f * k + a[i];
      printf("%s\n", f ? "No" : "Yes");
    }
  }
  return 0;
}
