#include <bits/stdc++.h>
using namespace std;
char s[10];
int a[100005];
bool idk[100005];
int main() {
  int n, k;
  cin >> n >> k;
  bool noques = true;
  int count = n + 1;
  for (int i = 0; i <= n; i++) {
    scanf(" %s", s);
    if (s[0] == '?') {
      idk[i] = true;
      noques = false;
      count--;
    } else {
      sscanf(s, " %d", &a[i]);
    }
  }
  int rem;
  if (noques) {
    if (!k) {
      puts(a[0] ? "No" : "Yes");
    } else {
      for (int i = 0; i <= n; i++) {
        rem += a[i];
        if (rem % k) break;
        rem /= k;
      }
      puts(rem ? "No" : "Yes");
    }
  } else {
    if (!k) {
      idk[0] ? puts(count & 1 ? "Yes" : "No") : puts(a[0] ? "No" : "Yes");
    } else {
      puts(n & 1 ? "Yes" : "No");
    }
  }
  return 0;
}
