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