#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100010;
const int MOD1 = 104729, MOD2 = 103357, MOD3 = 100000037, MOD4 = 1000012337,
          MOD5 = 1000008853;
inline int add(int a, int b, int mod) { return (((a + b) % mod) + mod) % mod; }
inline int mul(int a, int b, int mod) {
  return ((((long long int)a * b) % mod) + mod) % mod;
}
int n, k, num, prvi, zadnji;
string niz[MAXN];
int string_to_int(string &s) {
  int ret = 0;
  int neg = 0, poc = 0;
  if (s[0] == '-') {
    neg = 1;
    poc = 1;
  }
  for (int i = poc; i < s.size(); i++) ret = 10 * ret + s[i] - '0';
  if (neg) return -1 * ret;
  return ret;
}
int main() {
  scanf("%d %d", &n, &k);
  for (int i = 0; i <= n; i++) {
    cin >> niz[i];
    if (niz[i] != "?") num++;
  }
  if (num % 2 == 1)
    prvi = 0;
  else
    prvi = 1;
  if (n % 2 == 1)
    zadnji = 0;
  else
    zadnji = 1;
  if (num == n + 1) {
    int sum1 = 0, baza1 = 1;
    int sum2 = 0, baza2 = 1;
    int sum3 = 0, baza3 = 1;
    int sum4 = 0, baza4 = 1;
    int sum5 = 0, baza5 = 1;
    for (int i = 0; i <= n; i++) {
      sum1 = add(sum1, mul(string_to_int(niz[i]), baza1, MOD1), MOD1);
      baza1 = mul(baza1, k, MOD1);
      sum2 = add(sum2, mul(string_to_int(niz[i]), baza2, MOD2), MOD2);
      baza2 = mul(baza2, k, MOD2);
      sum3 = add(sum3, mul(string_to_int(niz[i]), baza3, MOD3), MOD3);
      baza3 = mul(baza3, k, MOD3);
      sum4 = add(sum4, mul(string_to_int(niz[i]), baza4, MOD4), MOD4);
      baza4 = mul(baza4, k, MOD4);
      sum5 = add(sum5, mul(string_to_int(niz[i]), baza5, MOD5), MOD5);
      baza5 = mul(baza5, k, MOD5);
    }
    if (sum1 == 0 && sum2 == 0 && sum3 == 0 && sum4 == 0 && sum5 == 0)
      printf("Yes\n");
    else
      printf("No\n");
  } else if (k == 0) {
    if (niz[0] != "?" && niz[0] != "0" || niz[0] == "?" && prvi == 1)
      printf("No\n");
    else
      printf("Yes\n");
  } else {
    if (zadnji == 0)
      printf("Yes\n");
    else
      printf("No\n");
  }
  return 0;
}
