#include <bits/stdc++.h>
using namespace std;
int main() {
  bool f;
  int n, m, i, c, mx;
  string s, s2;
  cin >> n >> m;
  cin >> s;
  for (int i = 0; i < n - m + 1; i++) {
    c = 0;
    mx = 0;
    f = false;
    s2 = s;
    for (int j = i; j <= i + m - 1; j++) {
      if (s2[j] == 'Y') {
        f = true;
        break;
      }
    }
    if (!f) {
      for (int j = i; j <= i + m - 1; j++) {
        s2[j] = 'N';
      }
      for (int j = 0; j < n; j++) {
        if (s2[j] == 'N') {
          c++;
          if (c > mx) {
            mx = c;
          }
        } else {
          c = 0;
        }
      }
      if (mx == m) {
        cout << "YES";
        return 0;
      }
    }
  }
  cout << "NO";
  return 0;
}
