#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
int n, k, a[100010];
char s[100010];
int main() {
  scanf("%d%d", &n, &k);
  int cnt = 0;
  for (int i = 0; i < (n + 1); ++i) {
    scanf("%s", s);
    if (s[0] != '?')
      cnt++, sscanf(s, "%d", &a[i]);
    else
      a[i] = inf;
  }
  if (k == 0)
    if ((a[0] == inf && cnt & 1) || a[0] == 0)
      puts("Yes");
    else
      puts("No");
  else if (cnt < n + 1)
    if (n & 1)
      puts("Yes");
    else
      puts("No");
  else {
    long long f = 0;
    for (int i = n; i >= 0 && abs(f) < 1e14; i--) f = f * k + a[i];
    printf("%s\n", f ? "No" : "Yes");
  }
  return 0;
}
