#include <bits/stdc++.h>
using namespace std;
vector<string> coef;
long long cast(string &s) {
  int v = 0;
  if (s[0] != '-') {
    for (int i = 0; i < s.length(); ++i) v = 10 * v + s[i] - '0';
    return v;
  } else {
    for (int i = 1; i < s.length(); ++i) v = 10 * v + s[i] - '0';
    return -v;
  }
}
long long edge = (1LL << 63) - 1;
int main() {
  ::ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  long long k;
  cin >> n >> k;
  int calc = 0;
  coef.resize(n + 1);
  for (int i = 0; i < n + 1; ++i) {
    string s;
    cin >> s;
    coef[i] = s;
    if (s == "?") ++calc;
  }
  int moves = n + 1 - calc;
  if (calc == 0) {
    if (k == 0) {
      if (coef[0] == "0")
        cout << "Yes";
      else
        cout << "No";
      return 0;
    }
    long long keep = 0;
    for (int i = n; i >= 0; --i) {
      long long val = cast(coef[i]);
      if (abs(keep) >= edge / abs(k)) break;
      keep *= k;
      keep += val;
      if (abs(keep) >= (long long)(i + 1) * 100000LL) break;
    }
    if (keep != 0) {
      cout << "No";
      return 0;
    } else {
      cout << "Yes";
      return 0;
    }
  }
  if (k == 0) {
    if (coef[0] != "?" && coef[0] != "0") {
      cout << "No";
      return 0;
    }
    if (coef[0] == "?" && moves % 2 == 0) {
      cout << "No";
      return 0;
    }
    cout << "Yes";
  } else {
    if (moves % 2 == 0) {
      if (calc % 2 == 0) {
        cout << "Yes";
        return 0;
      } else {
        cout << "No";
        return 0;
      }
    } else {
      if (calc % 2 == 0) {
        cout << "No";
        return 0;
      } else {
        cout << "Yes";
        return 0;
      }
    }
  }
  return 0;
}
