#include <bits/stdc++.h>
const int maxn = 1e5 + 10;
std::string in[maxn];
int coeff[maxn];
int main() {
  std::ios::sync_with_stdio(false);
  int n, k;
  std::cin >> n >> k;
  ++n;
  std::cin.ignore();
  for (int i = 0; i < n; i++) std::getline(std::cin, in[i]);
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    if (in[i] == "?") {
      cnt++;
    } else {
      coeff[i] = std::atoi(in[i].c_str());
    }
  }
  bool ourturn = (n - cnt) & 1;
  if (k == 0) {
    if ((ourturn && in[0] == "?") || in[0] == "0") {
      std::cout << "Yes\n";
      return 0;
    } else {
      std::cout << "No\n";
      return 0;
    }
  }
  if (cnt == 0) {
    int val = 0;
    long long mods[30];
    long long vals[30];
    std::srand(time(0));
    for (int i = 0; i < 30; i++)
      mods[i] = std::rand() % int(1e5) + 100000, vals[i] = 0;
    for (int i = n - 1; i >= 0; i--)
      for (int j = 0; j < 30; j++) vals[j] = (vals[j] * k + coeff[i]) % mods[j];
    bool zero = true;
    for (int j = 0; j < 30; j++)
      if (vals[j] != 0) zero = false;
    if (zero) {
      std::cout << "Yes\n";
    } else {
      std::cout << "No\n";
    }
    return 0;
  }
  if (n & 1) {
    std::cout << "No\n";
  } else {
    std::cout << "Yes\n";
  }
  return 0;
}
