#include <bits/stdc++.h>
using std::cin;
using std::cout;
char s[11];
long long a[100007];
inline long long qp(long long base, long long p, long long mo) {
  long long res = 1;
  while (p) {
    if (p & 1) (res *= base) %= mo;
    (base *= base) %= mo;
    p >>= 1;
  }
  return res;
}
signed main() {
  std::ios::sync_with_stdio(0);
  long long n, k, cnt = 0, tot = 0;
  cin >> n >> k;
  for (long long i = 0; i <= n; ++i) {
    cin >> (s + 1);
    if (s[1] == '?') {
      ++cnt;
      a[i] = 1e9;
    } else {
      ++tot;
      long long flag = 1;
      if (s[1] == '-') flag = -1;
      long long len = strlen(s + 1), sum = 0;
      for (long long j = 1; j <= len; ++j) {
        if (s[j] == '-') continue;
        sum = sum * 10 + s[j] - 48;
      }
      a[i] = sum * flag;
    }
  }
  bool who;
  if (tot & 1)
    who = 0;
  else
    who = 1;
  if (k == 0) {
    if (a[0] == 1e9) {
      if (who == 0)
        cout << "Yes\n";
      else
        cout << "No\n";
    } else {
      if (a[0] != 0) {
        cout << "No\n";
      } else {
        cout << "Yes\n";
      }
    }
    return 0;
  }
  if (tot == n + 1) {
    long long p = 998244353, sum = 0;
    for (long long i = 0; i <= n; ++i)
      sum = (sum + (a[i] + p) % p * qp(k, i, p) % p + p) % p;
    if (sum) {
      cout << "No\n";
      return 0;
    }
    p = 1e9 + 7, sum = 0;
    for (long long i = 0; i <= n; ++i)
      sum = (sum + (a[i] + p) % p * qp(k, i, p) % p + p) % p;
    if (sum) {
      cout << "No\n";
      return 0;
    }
    p = 1e9 + 9, sum = 0;
    for (long long i = 0; i <= n; ++i)
      sum = (sum + (a[i] + p) % p * qp(k, i, p) % p + p) % p;
    if (sum) {
      cout << "No\n";
      return 0;
    }
    cout << "Yes\n";
    return 0;
  }
  if (cnt & 1) {
    if (who == 0)
      cout << "Yes\n";
    else
      cout << "No\n";
  } else {
    if (who == 1)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
  return 0;
}
