#include <bits/stdc++.h>
int main() {
  int n;
  char s[110];
  scanf("%d", &n);
  scanf("%s", s + 1);
  for (int i = 1; i <= n; i++) {
    if (s[i] != '*') continue;
    for (int j = 1; j <= n; j++) {
      int k;
      for (k = 1; k <= 4; k++) {
        if (s[i + k * j] != '*') break;
      }
      if (k > 4) {
        printf("yes\n");
        return 0;
      }
    }
  }
  printf("no\n");
}
