#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, k;
  cin >> n >> k;
  char str[n];
  cin >> str;
  bool flag = false;
  for (int i = 0; i <= n - k; ++i) {
    int count = 0, qm = 0, fqm = -1;
    bool flag1 = false;
    bool flag2 = false;
    for (int j = 0; j < k; ++j) {
      if (str[i + j] != 'Y') count += 1;
      if (str[i + j] == '?') {
        if (qm == 0) fqm = i + j;
        qm += 1;
      }
    }
    if (count == k) {
      if (i > 0 && str[i - 1] == 'N') {
        if (qm == 0) {
          flag = false;
          break;
        } else {
          str[fqm] = 'Y';
          continue;
        }
      }
      if (i < n - k && str[i + k] == 'N') {
        if (qm == 0) {
          flag = false;
          break;
        } else {
          str[fqm] = 'Y';
          continue;
        }
      }
      flag = true;
    }
  }
  if (flag)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
