#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
const int INF = 1e9;
void print(bool b) {
  puts(b ? "Yes" : "No");
  exit(0);
}
int N, K, U;
int A[MAXN];
char buf[10];
int main() {
  if (fopen("input.txt", "r")) {
    freopen("input.txt", "r", stdin);
  }
  scanf("%d %d", &N, &K);
  for (int i = 0; i <= N; i++) {
    scanf("%s", buf);
    if (buf[0] == '?') {
      A[i] = INF;
      U++;
    } else {
      sscanf(buf, "%d", &A[i]);
    }
  }
  if (K == 0) {
    if (A[0] == INF) {
      print((N + 1 - U) % 2);
    } else {
      print(!A[0]);
    }
  }
  if (U) {
    print(N % 2);
  }
  while (N >= 0 && !A[N]) {
    N--;
  }
  if (N < 0) {
    print(true);
  }
  long long val = 0;
  for (int i = N; i >= 0; i--) {
    val = K * val + A[i];
    if (llabs(val) > 1e14) {
      print(false);
    }
  }
  print(!val);
}
