#include <bits/stdc++.h>
using namespace std;
const int mod1 = 1000013;
const int mod2 = 1000019;
std::vector<int> power1(100001);
std::vector<int> power2(100001);
void Power1(int base, int p, int m) {
  int res = 1;
  for (int i = 0; i < p; ++i) {
    power1[i] = res;
    res = (res * base) % m;
  }
  power1[p] = res;
}
void Power2(int base, int p, int m) {
  int res = 1;
  for (int i = 0; i < p; ++i) {
    power2[i] = res;
    res = (res * base) % m;
  }
  power2[p] = res;
}
int main() {
  int n, k, unk = 0;
  long long sum1 = 0, sum2 = 0;
  std::cin >> n >> k;
  std::vector<bool> unknown(n + 1);
  std::vector<int> coef(n + 1);
  Power1(k, n, mod1);
  Power2(k, n, mod2);
  for (int i = 0; i <= n; ++i) {
    std::string s;
    cin >> s;
    if (s == "?") {
      coef[i] = 0;
      unk++;
      unknown[i] = true;
    } else {
      coef[i] = stoi(s);
      unknown[i] = false;
      sum1 = (sum1 + (long long)(coef[i] % mod1) * power1[i]) % mod1;
      sum2 = (sum2 + (long long)(coef[i] % mod2) * power2[i]) % mod2;
    }
  }
  bool ourTurn = ((n - unk) % 2 == 0);
  bool result = false;
  if (k == 0) {
    if (unknown[0])
      result = ourTurn;
    else
      result = (coef[0] == 0);
  } else {
    if (unk == 0) {
      result = ((sum1 == 0) && (sum2 == 0));
    } else {
      result = (n % 2 == 1);
    }
  }
  cout << ((result) ? "Yes" : "No");
  return 0;
}
