#include <bits/stdc++.h>
using namespace std;
const long double PI = 3.1415926535897932384626433832795;
const long double EPS = 1e-11;
int n, k;
string s;
char c[100100];
int a[100100];
int kw;
signed long long d[3][100100];
bool gorner() {
  for (int i = 0; i < (n + 1); i++) d[0][i] = a[n - i];
  d[1][0] = d[0][0];
  d[2][0] = d[0][0];
  for (int i = 1; i < n + 1; i++) {
    d[1][i] = (d[0][i] + k * d[1][i - 1]);
    if (abs(d[1][i]) > 1e18) return 0;
  }
  return (d[1][n] == 0);
}
int main() {
  cin >> n >> k;
  for (int i = 0; i < (n + 1); i++) {
    cin >> s;
    if (s == "?") {
      c[i] = '?';
      kw++;
    }
    a[i] = atoi(s.c_str());
  }
  if (k == 0) {
    if (c[0] != '?') {
      if (a[0] == 0)
        cout << "YES";
      else
        cout << "NO";
    } else {
      if ((n + 1 - kw) % 2 == 1)
        cout << "YES";
      else
        cout << "NO";
    }
    return 0;
  }
  if (kw == 0) {
    if (gorner())
      cout << "YES";
    else
      cout << "NO";
    return 0;
  }
  if ((n + 1 - kw) % 2 == 0) {
    if (kw % 2 == 0)
      cout << "YES";
    else
      cout << "NO";
  } else {
    if (kw % 2 == 1)
      cout << "YES";
    else
      cout << "NO";
  }
  return 0;
}
