#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int count(string s) {
  s.push_back('?');
  int ans = 0, cur = 0;
  for (int i = 0; i < s.size(); ++i)
    if (s[i] == 'N')
      cur++;
    else {
      ans = max(ans, cur);
      cur = 0;
    }
  return ans;
}
int small(string s) {
  for (char &c : s)
    if (c == '?') c = 'Y';
  return count(s);
}
bool match(string a, string b) {
  for (int i = 0; i < a.size(); ++i)
    if (!(b[i] == a[i] || b[i] == '?')) return false;
  return true;
}
int main() {
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  if (small(s) > k) {
    puts("NO");
    return 0;
  }
  s = 'Y' + s + 'Y';
  string req = "Y" + string(k, 'N') + "Y";
  for (int i = 0; i < (int)s.size() - k + 1; ++i)
    if (match(req, s.substr(i, k + 2))) {
      puts("YES");
      return 0;
    }
  puts("NO");
}
