#include <bits/stdc++.h>
using namespace std;
bool known_a0, ans;
int known, n, k;
int coef[100001];
int remainder(int a[], int n, int k) {
  long long bi = a[n];
  for (int i = n - 1; i >= 0; i--) {
    bi = a[i] + bi * k;
    if (bi > 1E9 || bi < -1E9) break;
  }
  return bi;
}
void solve() {
  char buf[1000];
  int ai;
  known = 0;
  cin >> n >> k;
  cin.ignore(1000, '\n');
  cin.getline(buf, 1000, '\n');
  if (sscanf(buf, "%d", &ai) == 0)
    known_a0 = false;
  else {
    known_a0 = true;
    coef[0] = ai;
    known++;
  }
  for (int i = 1; i <= n; i++) {
    cin.getline(buf, 1000, '\n');
    if (sscanf(buf, "%d", &ai) != 0) {
      known++;
      coef[i] = ai;
    }
  }
  if (k == 0) {
    if (known_a0 == true) {
      if (coef[0] == 0)
        ans = true;
      else
        ans = false;
    } else {
      if (known % 2 == 1)
        ans = true;
      else
        ans = false;
    }
  } else {
    if (known == n + 1) {
      if (remainder(coef, n, k) == 0)
        ans = true;
      else
        ans = false;
    } else {
      if (n % 2 == 1)
        ans = true;
      else
        ans = false;
    }
  }
  if (ans)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
void test() {
  int a[] = {144, 106, 19, 1};
  cout << remainder(a, 3, -2) << endl;
  int b[] = {9, -9, -19, 1, 2};
  cout << remainder(b, 4, 1) << endl;
}
int main() {
  cin.sync_with_stdio(false);
  solve();
  return 0;
}
