#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, k;
  cin >> n >> k;
  int played = 0;
  string p;
  vector<string> values;
  for (int i = 0; i < n + 1; i++) {
    string s;
    cin >> s;
    if (i == 0) p = s;
    if (s != "?") played++;
    values.push_back(s);
  }
  if (k == 0) {
    if (values[0] == "0" or (values[0] == "?" and played % 2 == 1))
      cout << "Yes";
    else
      cout << "No";
    return 0;
  }
  if (played == n + 1) {
    vector<long long> fv;
    for (int i = 0; i < values.size(); i++) fv.push_back(stoi(values[i]));
    long long mm1[fv.size() + 5];
    mm1[0] = 1;
    for (int i = 1; i < fv.size() + 5; i++)
      mm1[i] = (1LL * mm1[i - 1] * k) % 715827883;
    long long fv1 = 0;
    for (int i = 0; i < fv.size(); i++)
      fv1 = (fv1 + (1LL * fv[i] * mm1[i]) % 715827883) % 715827883;
    if (fv1 == 0)
      cout << "Yes";
    else
      cout << "No";
    return 0;
  }
  if (played % 2 == 1) {
    if ((n + 1 - played) % 2 == 1)
      cout << "Yes";
    else
      cout << "No";
  } else {
    if ((n + 1 - played) % 2 == 0)
      cout << "Yes";
    else
      cout << "No";
  }
  return 0;
}
