#include <bits/stdc++.h>
char s[10000];
int main() {
  int n;
  scanf("%d", &n);
  scanf("%s", s);
  int t, d;
  bool succ = false;
  for (t = 0; t < n && !succ; ++t) {
    for (d = 1; t + 4 * d < n; ++d) {
      if (s[t] == '*' && s[t + d] == '*' && s[t + d + d] == '*' &&
          s[t + 3 * d] == '*' && s[t + 4 * d] == '*') {
        succ = true;
        break;
      }
    }
  }
  if (succ)
    printf("yes\n");
  else
    printf("no\n");
  return 0;
}
