#include <bits/stdc++.h>
using namespace std;
int n, k;
bool known[100001];
int a[100001];
bool my_turn = false;
bool all_known = true;
bool Solve() {
  if (k == 0) {
    if (known[0]) {
      return a[0] == 0;
    } else {
      return my_turn;
    }
  } else {
    if (all_known) {
      for (long long mod : {22801763489LL, 71856445751LL}) {
        long long x = 0;
        for (int i = n; i >= 0; --i) {
          x = (x * k + a[i]) % mod;
        }
        if (x != 0) return false;
      }
      return true;
    } else {
      return n % 2 == 1;
    }
  }
}
int main() {
  if (!(scanf("%d%d", &n, &k))) {
    printf("CHECK(%s) failed\n", "scanf(\"%d%d\", &n, &k)");
    exit(0);
  };
  for (int i = 0; i <= n; ++i) {
    static char buff[16];
    if (!(scanf("%s", buff))) {
      printf("CHECK(%s) failed\n", "scanf(\"%s\", buff)");
      exit(0);
    };
    known[i] = buff[0] != '?';
    if (known[i]) {
      sscanf(buff, "%d", &a[i]);
      my_turn = !my_turn;
    } else {
      all_known = false;
    }
  }
  if (Solve())
    printf("Yes\n");
  else
    printf("No\n");
  return 0;
}
