#include <bits/stdc++.h>
using namespace std;
int n, k, cal[100009], f = 0;
bool cc() {
  int temp = cal[n + 1];
  for (int i = n + 1; i >= 2; i--) {
    temp = temp * k % 1000000007 + cal[i - 1];
  }
  if (temp != 0)
    return false;
  else
    return true;
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n + 1; i++) {
    char c[5];
    scanf("%s", c);
    if (c[0] == '?') {
      f++;
      cal[i] = 999999999;
    } else
      cal[i] = atoi(c);
  }
  bool flag = false;
  if (k == 0) {
    if (cal[1] == 0)
      flag = true;
    else {
      f = n + 1 - f;
      if (f % 2 == 1 && cal[1] == 999999999) flag = true;
    }
  } else {
    if ((n + 1) % 2 == 0) {
      if (f >= 1) {
        flag = true;
      }
      if (f == 0 && cc()) flag = true;
    } else {
      if (cc() && f == 0) flag = true;
    }
  }
  if (flag)
    printf("Yes\n");
  else
    printf("No\n");
  return 0;
}
