#include <bits/stdc++.h>
using namespace std;
bool check_if_root(vector<int>& poly, const int k) {
  if (k == 0) {
    return poly[0] == 0;
  }
  poly.resize(poly.size() + 100, 0);
  int carry = 0;
  for (auto& x : poly) {
    const int tmp = x + carry;
    if (tmp % k != 0) {
      return false;
    }
    x = 0;
    carry = tmp / k;
  }
  return !carry;
}
constexpr int unset = 1000000000;
int main() {
  int n, k;
  cin >> n >> k;
  vector<int> v(n + 1, unset);
  for (auto& x : v) {
    cin >> ws;
    if (cin.peek() == '?') {
      cin.ignore();
      continue;
    }
    cin >> x;
  }
  if (none_of(begin(v), end(v), [](const int x) { return x == unset; })) {
    cout << (check_if_root(v, k) ? "Yes" : "No") << endl;
  } else if (k != 0) {
    cout << (n % 2 ? "Yes" : "No") << endl;
  } else if (v[0] != unset) {
    cout << (v[0] ? "No" : "Yes") << endl;
  } else {
    cout << (n % 2 == count(begin(v), end(v), unset) % 2 ? "Yes" : "No")
         << endl;
  }
  return 0;
}
