#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int n, k;
int a[maxn];
int b[maxn];
int rem = 0;
int idk = 1e9;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> k;
  for (int i = 0; i <= n; i++) {
    string s;
    cin >> s;
    if (s[0] == '?') {
      rem++;
      a[i] = idk;
    } else
      a[i] = stoi(s);
  }
  if (k == 0) {
    if (a[0] == 0)
      cout << "Yes";
    else if (a[0] == idk) {
      if ((n + 1) % 2 == rem % 2)
        cout << "No";
      else
        cout << "Yes";
    } else
      cout << "No";
  } else if (rem > 0) {
    if (n % 2 == 1)
      cout << "Yes";
    else
      cout << "No";
    return 0;
  } else {
    long double cur = 0;
    for (int i = n; i >= 0; i--) cur = cur * k + a[i];
    if (cur == 0)
      cout << "Yes";
    else
      cout << "No";
  }
  return 0;
}
