#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int a_value[n + 1];
  bool a_flag[n + 1];
  int turns = 0;
  for (int i = 0, j; i <= n; i++) {
    if (cin >> j) {
      a_value[i] = j;
      a_flag[i] = true;
      turns++;
    } else {
      cin.clear();
      cin.ignore();
      a_flag[i] = false;
    }
  }
  if (turns < n + 1) {
    if (k == 0) {
      if (a_flag[0])
        cout << (a_value[0] == 0 ? "Yes" : "No");
      else
        cout << (turns % 2 ? "Yes" : "No");
    } else {
      int degree;
      for (degree = n; degree > 0; degree--)
        if (!a_flag[degree] || a_value[degree] != 0) break;
      if (degree == 0)
        cout << (turns % 2 && !a_flag[0] ? "Yes" : "No");
      else
        cout << (n % 2 ? "Yes" : "No");
    }
    return 0;
  }
  if (k == 0) {
    cout << (a_value[0] == 0 ? "Yes" : "No");
    return 0;
  }
  int actual_degree;
  for (actual_degree = n; actual_degree > 0; actual_degree--)
    if (a_value[actual_degree] != 0) break;
  if (actual_degree == 0) {
    cout << (a_value[0] == 0 ? "Yes" : "No");
    return 0;
  }
  int b, d;
  b = -a_value[0] / k;
  for (int i = 1; i < n; i++) {
    d = b - a_value[i];
    if (d % k != 0) {
      cout << "No";
      return 0;
    }
    b = d / k;
  }
  cout << (b == a_value[n] ? "Yes" : "No");
}
