#include <bits/stdc++.h>
using namespace std;
long long int val[200000];
int arr[100900];
int main() {
  int n, k;
  long long int total = 0;
  scanf("%d%d\n", &n, &k);
  int q = 0, q0 = 0;
  for (int i = n; i >= 0; i--) {
    char s[20];
    scanf("%s", s);
    if (s[0] == '?') {
      q++;
      if (i == n) q0++;
    } else {
      int num = 0, t = 1;
      for (int l = strlen(s) - 1; l > 0; l--, t = t * 10)
        num = num + (s[l] - '0') * t;
      if (s[0] == '-')
        num = -num;
      else
        num = num + (s[0] - '0') * t;
      arr[i] = num;
      total += num;
    }
  }
  if (k < 0) {
    k = abs(k);
    int s = 1;
    if (n % 2 == 1) s = -1;
    total = 0;
    for (int i = 0; i <= n; i++, s = -1 * s) {
      arr[i] = arr[i] * s;
      total += arr[i];
    }
  }
  if (q != 0) {
    if (k == 0) {
      if ((arr[n] == 0 && q0 == 0) ||
          (q0 == 1 && (n % 2 == 1 && q % 2 == 1 || n % 2 == 0 && q % 2 == 0)))
        printf("Yes");
      else
        printf("No");
      return 0;
    }
    if (n % 2 == 1)
      printf("Yes\n");
    else
      printf("No\n");
  } else {
    int p = n, i, m = 0, f = 1;
    if (k > 1) {
      for (i = 0; i <= n; i++, p--) {
        int num = abs(arr[i]), s = 1, lo = 0;
        if (arr[i] < 0) s = -1;
        while (num) {
          val[p + lo] += s * (num % k);
          while (abs(val[p + lo]) >= k) {
            if (val[p + lo] > 0) {
              val[p + lo + 1]++;
              val[p + lo] -= k;
            } else {
              val[p + lo + 1]--;
              val[p + lo] += k;
            }
          }
          m = max(m, p + lo);
          lo++;
          num = num / abs(k);
        }
      }
      long long int y = 0;
      for (i = 0; i <= m + 5; i++) {
        if (y % k != 0)
          f = 0;
        else
          y = y / k + val[i];
      }
      if (y != 0) f = 0;
    } else {
      if (k == 1) {
        if (total != 0) f = 0;
      }
      if (k == 0) {
        if (arr[n] != 0) f = 0;
      }
    }
    if (f == 1)
      printf("Yes\n");
    else
      printf("No\n");
  }
  return 0;
}
