#include <bits/stdc++.h>
int n, k;
int aa[100011];
bool bb[100011];
bool check() {
  long long res = aa[n];
  for (int i = n - 1; i >= 0; --i) {
    res = res * k + aa[i];
    if (res > 1e10 || res < -1e10) return false;
  }
  return (res == 0);
}
int main() {
  scanf("%d%d", &n, &k);
  char ch[10];
  int flag, tot;
  tot = 0;
  memset(bb, 0, sizeof(bb));
  for (int i = 0; i <= n; ++i) {
    scanf("%s", ch);
    if (ch[0] == '?') {
      ++tot;
      bb[i] = true;
    } else {
      aa[i] = 0;
      flag = (ch[0] == '-') ? -1 : 1;
      for (int j = (flag == (-1)); j < strlen(ch); ++j)
        aa[i] = aa[i] * 10 + (ch[j] - 48) * flag;
    }
  }
  bool ans;
  if (k == 0) {
    if (bb[0])
      ans = ((n + 1 - tot) % 2 == 1);
    else
      ans = (aa[0] == 0);
  } else if (tot == 0)
    ans = check();
  else
    ans = (n % 2 == 1);
  if (ans)
    puts("Yes");
  else
    puts("No");
  return 0;
}
