#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0), eps = 1e-8;
const int inf = ~0U >> 2, P = 1e9 + 7;
int Pow(int x, long long t) {
  int r = 1;
  for (; t; t >>= 1, x = (long long)x * x % P)
    if (t & 1) r = (long long)r * x % P;
  return r;
}
int n, K;
char s[1010];
int num[101010];
bool ok() {
  long long tp = 0;
  for (int i = 0; i < n; ++i) {
    tp -= num[i];
    if (tp % K != 0) return false;
    tp /= K;
  }
  return tp == num[n];
}
int main() {
  scanf("%d%d", &n, &K);
  int cnt = 0;
  for (int i = 0; i < n + 1; ++i) {
    scanf("%s", s);
    if (s[0] == '?')
      num[i] = inf, ++cnt;
    else {
      stringstream ss(s);
      ss >> num[i];
    }
  }
  if (K == 0) {
    if (num[0] == inf) {
      puts((n + 1 - cnt) & 1 ? "Yes" : "No");
    } else {
      puts(num[0] == 0 ? "Yes" : "No");
    }
  } else {
    if (cnt == 0) {
      puts(ok() ? "Yes" : "No");
    } else
      puts((n + 1) & 1 ? "No" : "Yes");
  }
  return 0;
}
