#include <bits/stdc++.h>
using namespace std;
template <class _Tp>
void ckmax(_Tp &a, _Tp b) {
  if (a < b) a = b;
}
template <class _Tp>
void ckmin(_Tp &a, _Tp b) {
  if (a > b) a = b;
}
template <class _Tp>
_Tp gcd(_Tp a, _Tp b) {
  return (b == 0) ? (a) : (gcd(b, a % b));
}
int read() {
  char ch = getchar();
  bool f = 1;
  int x = 0;
  while ((ch < '0' || ch > '9') && ch != '-') ch = getchar();
  if (ch == '-') f = 0, ch = getchar();
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + (ch & 15);
    ch = getchar();
  }
  return f ? x : -x;
}
const int inf = 1000000000;
const long long Inf = 1000000000000000000ll;
int n, k;
const int mod[] = {10007, 1000007, 1000000007, 19260817, 999911659};
int a[100050];
bool ok[100050];
char s[20];
int main() {
  n = read();
  k = read();
  int cnt = 0;
  memset(ok, 0, sizeof(ok));
  for (int i = 0; i <= n; i++) {
    scanf("%s", s);
    if (s[0] == '?')
      cnt++, ok[i] = 1;
    else {
      int t = 1, tmp = 0;
      if (s[0] == '-') t = -1;
      for (int j = (s[0] == '-'); j < strlen(s); j++)
        tmp = tmp * 10 + s[j] - '0';
      a[i] = tmp * t;
    }
  }
  bool ans = 0;
  if (k == 0) {
    if (ok[0]) {
      if ((n + 1 - cnt) & 1)
        ans = 1;
      else
        ans = 0;
    } else if (a[0] == 0)
      ans = 1;
    else
      ans = 0;
  } else {
    if (cnt) {
      if (n & 1)
        ans = 1;
      else
        ans = 0;
    } else {
      bool flag = 1;
      for (int j = 0; j < 5; j++) {
        long long res = 0;
        for (int i = n; i >= 0; i--) res = (res * k + a[i]) % mod[j];
        if (res) flag = 0;
      }
      if (flag)
        ans = 1;
      else
        ans = 0;
    }
  }
  printf(ans ? "Yes\n" : "No\n");
  return 0;
}
