#include <bits/stdc++.h>
using namespace std;
int a[100005];
const int INF = 2e9 + 7;
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  int unk = 0;
  for (int i = 0; i <= n; ++i) {
    char s[20];
    scanf("%s", s);
    if (s[0] == '?') {
      a[i] = INF;
      ++unk;
    } else {
      a[i] = atoi(s);
    }
  }
  if (k == 0) {
    if (a[0] == 0) {
      printf("Yes\n");
    } else if (a[0] == INF) {
      if ((n + 1 - unk) & 1) {
        printf("Yes\n");
      } else {
        printf("No\n");
      }
    } else {
      printf("No\n");
    }
  } else {
    if (unk > 0) {
      if ((n + 1) & 1) {
        printf("No\n");
      } else {
        printf("Yes\n");
      }
    } else {
      double res = 0;
      for (int i = n; i >= 0; --i) {
        res = res * k + a[i];
      }
      if (res == 0) {
        printf("Yes\n");
      } else {
        printf("No\n");
      }
    }
  }
}
