#include <bits/stdc++.h>
using namespace std;
string Coef[200000];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  int countQuest = 0;
  for (int i = 0; i <= n; ++i) {
    cin >> Coef[i];
    countQuest += (Coef[i] == "?");
  }
  if (k == 0) {
    if (Coef[0] == "?") {
      if ((n + 1 - countQuest) % 2) {
        cout << "Yes";
      } else {
        cout << "No";
      }
      return 0;
    } else {
      if (Coef[0] == "0") {
        cout << "Yes";
      } else {
        cout << "No";
      }
    }
    return 0;
  }
  for (int i = 0; i <= n; ++i) {
    if (Coef[i] == "?") {
      cout << ((n % 2) ? "Yes\n" : "No\n");
      return 0;
    }
  }
  srand(time(0));
  vector<int> mods;
  for (int i = 0; i < 10; ++i) {
    mods.push_back(rand() % 500000 + 500000);
  }
  vector<int> Ans(mods.size(), 0);
  for (int i = n; i >= 0; --i) {
    int num = std::atoi(Coef[i].c_str());
    for (int i = 0; i < mods.size(); ++i) {
      Ans[i] = (1LL * Ans[i] * k + num) % mods[i];
    }
  }
  for (auto x : Ans) {
    if (x != 0) {
      cout << "No\n";
      return 0;
    }
  }
  cout << "Yes\n";
  return 0;
}
