#include <bits/stdc++.h>
using namespace std;
long long pwr(long long base, long long p, long long mod = (1000000007LL)) {
  long long ans = 1;
  while (p) {
    if (p & 1) ans = (ans * base) % mod;
    base = (base * base) % mod;
    p /= 2;
  }
  return ans;
}
int n, k;
long long arr[1000005];
long long get_value(string str) {
  if (str[0] == '?') return (1000000007LL);
  int start = 0;
  if (str[0] == '-') start = 1;
  int ans = 0;
  for (int i = start; i < (int)str.length(); i++) ans = ans * 10 + str[i] - '0';
  if (start == 1) ans *= -1;
  return ans;
}
bool divisible_by_k() {
  if (arr[0] % k != 0) return false;
  for (int i = 1; i <= n; i++) {
    arr[i] += arr[i - 1] / k;
    if (arr[i] % k != 0) return false;
  }
  return (arr[n] == 0);
}
int main() {
  ios_base::sync_with_stdio(0);
  string str;
  cin >> n >> k;
  bool all_done = true;
  for (int i = 0; i <= n; i++) {
    cin >> str;
    arr[i] = get_value(str);
    if (arr[i] == (1000000007LL)) all_done = false;
  }
  if (k == 0) {
    if (arr[0] == 0)
      cout << "Yes";
    else if (arr[0] == (1000000007LL)) {
      int turn = 0;
      for (int i = 0; i <= n; i++)
        if (arr[i] != (1000000007LL)) turn ^= 1;
      if (turn == 1) {
        cout << "Yes";
      } else
        cout << "No";
    } else
      cout << "No";
    return 0;
  }
  if (all_done) {
    if (divisible_by_k())
      cout << "Yes";
    else
      cout << "No";
    return 0;
  }
  if ((n + 1) % 2 == 0) {
    cout << "Yes";
  } else
    cout << "No";
  return 0;
}
