#include <bits/stdc++.h>
using namespace std;
void to_base(vector<int> &ck, int k, int i, int x) {
  int sign = 1;
  if (x < 0) {
    x = -x;
    sign = -1;
  }
  while (x > 0) {
    ck[i] += sign * (x % k);
    x /= k;
    i++;
  }
}
int main(int argc, char **argv) {
  ios_base::sync_with_stdio(false);
  cin.tie(0), cout.tie(0), cout.precision(15);
  int n, k;
  cin >> n >> k;
  vector<int> a(n + 1);
  int first_unknown = -1;
  int moves = 0;
  for (int i = 0; i <= n; i++) {
    string line;
    cin >> line;
    if (line[0] != '?') {
      stringstream ss(line);
      ss >> a[i];
      moves++;
    } else {
      if (first_unknown == -1) {
        first_unknown = i;
      }
    }
  }
  if (k == 0) {
    if (first_unknown == 0) {
      if (moves % 2) {
        cout << "Yes" << endl;
      } else {
        cout << "No" << endl;
      }
    } else {
      if (a[0] == 0) {
        cout << "Yes" << endl;
      } else {
        cout << "No" << endl;
      }
    }
  } else {
    if (first_unknown != -1) {
      if ((n + 1) % 2) {
        cout << "No" << endl;
      } else {
        cout << "Yes" << endl;
      }
      return 0;
    }
    if (k == 1 || k == -1) {
      int s = 0;
      int f = 1;
      for (int i = 0; i <= n; i++) {
        s += a[i] * f;
        f *= k;
      }
      if (s == 0) {
        cout << "Yes" << endl;
      } else {
        cout << "No" << endl;
      }
      return 0;
    }
    int ksign = 1;
    if (k < 0) {
      k = -k;
      ksign = -1;
    }
    int f = 1;
    vector<int> ck(n + 1 + 13, 0);
    for (int i = 0; i <= n; i++) {
      to_base(ck, k, i, a[i] * f);
      f *= ksign;
    }
    for (int i = 0; i < ck.size(); i++) {
      int x = ck[i];
      ck[i] = 0;
      to_base(ck, k, i, x);
      if (ck[i] != 0) {
        cout << "No" << endl;
        return 0;
      }
    }
    cout << "Yes" << endl;
  }
  return 0;
}
