n, k = map(int, input().split())
s = input().strip('.#')
dist = len(s) - 1
print('NO' if dist % k or '#' in s[0:dist:k] else 'YES')
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
int n, k;
cin >> n >> k;
string s;
cin >> s;
int num = 0;
char c = 'a';
for (int i = 0; i < s.size(); i++)
{
if (s[i] == 'G' || s[i] == 'T')
{
num = i;
c = s[i];
break;
}
}
for (int i = num; i < s.size(); i += k)
{
if (s[i] != c)
if (s[i] == 'G' || s[i] == 'T')
{
cout << "YES";
return 0;
}
if (s[i] == '#')
{
cout << "NO";
return 0;
}
}
cout << "NO";
}
13 Reasons Why | Friend's Relationship |
Health of a person | Divisibility |
A. Movement | Numbers in a matrix |
Sequences | Split houses |
Divisible | Three primes |
Coprimes | Cost of balloons |
One String No Trouble | Help Jarvis! |
Lift queries | Goki and his breakup |
Ali and Helping innocent people | Book of Potion making |
Duration | Birthday Party |
e-maze-in | Bricks Game |
Char Sum | Two Strings |
Anagrams | Prime Number |
Lexical Sorting Reloaded | 1514A - Perfectly Imperfect Array |
580A- Kefa and First Steps | 1472B- Fair Division |