#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  char c;
  int cnt1 = 0, cnt2 = 0;
  int cur1 = 0, cur2 = 0;
  vector<char> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    c = a[i];
    if (c == '?') {
      cur1++;
      cur2 = 0;
    } else if (c == 'N') {
      cur2++;
      cur1++;
    } else if (c == 'Y') {
      cur2 = 0;
      cur1 = 0;
    }
    if (cur1 >= k) {
      if ((i == n - 1 || a[i + 1] != 'N') && (i - k == -1 || a[i - k] != 'N')) {
        cnt1 = cur1;
      }
    } else {
      cnt1 = max(cnt1, cur1);
    }
    cnt2 = max(cnt2, cur2);
  }
  if (cnt1 >= k && cnt2 <= k) {
    cout << "YES\n";
  } else {
    cout << "NO\n";
  }
}
