#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  int def = 0;
  int a[N], d[N] = {};
  for (int i = 0; i <= n; i++) {
    int a[N];
    char c[10];
    if (scanf("%d", &a[i]))
      d[i] = 1, def++;
    else
      scanf("%s", c);
  }
  if (k == 0) {
    if (d[0])
      printf("%s\n", a[0] == 0 ? "Yes" : "No");
    else
      printf("%s\n", def % 2 == 0 ? "No" : "Yes");
  } else {
    if (def != n + 1) {
      printf("%s\n", n % 2 ? "Yes" : "No");
    } else {
      if (k == 1) {
        int resp = 0;
        for (int i = n; i >= 0; i--) resp += a[i];
        printf("%s\n", resp == 0 ? "Yes" : "No");
      } else {
        long long r = 0;
        for (int i = 0; i <= n; i++) {
          r = r / k + a[i];
          if (r % k) break;
        }
        printf("%s\n", r == 0 ? "Yes" : "No");
      }
    }
  }
  return 0;
}
