#include <bits/stdc++.h>
using namespace std;
int a[100010], i, j, n, k, l, x, y, ans;
char s[10];
int main() {
  scanf("%d%d\n", &n, &k);
  y = 0;
  for (i = 0; i <= n; ++i) {
    scanf("%s\n", s);
    if (s[0] == '?') {
      ++y;
      a[i] = 1000000;
      continue;
    }
    l = strlen(s);
    if (s[0] == '-')
      x = -1, j = 1;
    else
      x = 1, j = 0;
    a[i] = 0;
    for (; j < l; ++j) a[i] = a[i] * 10 + s[j] - '0';
    a[i] *= x;
  }
  if (k == 0) {
    if (a[0] == 1000000) {
      if ((n + 1 - y) & 1)
        ans = 1;
      else
        ans = 0;
    } else if (a[0] == 0)
      ans = 1;
    else
      ans = 0;
  } else if (y)
    ans = (n & 1);
  else {
    ans = 1;
    for (i = 0; i < n; ++i)
      if (a[i] % k != 0) {
        ans = 0;
        break;
      } else
        a[i + 1] += a[i] / k;
    if (ans && a[n] != 0) ans = 0;
  }
  if (ans)
    printf("Yes\n");
  else
    printf("No\n");
}
