#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
const int INF = 0x3f3f3f3f;
int a[MAXN];
int main() {
  int n, k;
  char s[20];
  while (~scanf("%d %d", &n, &k)) {
    int cc = 0;
    for (int i = 0; i <= n; ++i) {
      scanf("%s", s);
      if (s[0] == '?')
        a[i] = INF;
      else {
        int tt = 0;
        int p = 0;
        if (s[0] == '-') p = 1;
        for (; s[p]; ++p) tt = tt * 10 + s[p] - '0';
        if (s[0] == '-') tt *= -1;
        a[i] = tt;
        cc++;
      }
    }
    if (k == 0) {
      if (a[0] == 0)
        printf("Yes\n");
      else if (a[0] == INF) {
        if (cc % 2)
          printf("Yes\n");
        else
          printf("No\n");
      } else
        printf("No\n");
    } else {
      if (cc < (n + 1)) {
        if ((n + 1) % 2)
          printf("No\n");
        else
          printf("Yes\n");
      } else {
        long long tt = 0;
        for (int i = n; i >= 0 && abs(tt) < 1e14; --i) {
          tt = tt * k + a[i];
        }
        if (tt == 0)
          printf("Yes\n");
        else
          printf("No\n");
      }
    }
  }
  return 0;
}
