#include <bits/stdc++.h>
using namespace std;
char str[105];
int main() {
  int n, i, j, k, l, c, r;
  while (scanf("%d", &n) != EOF) {
    scanf("%s", str);
    l = 0;
    r = 0;
    for (i = 0; i < n - 4; i++) {
      for (j = 1; j <= 24 - l; j++) {
        c = 0;
        for (k = i; k < n; k += j) {
          if (str[k] == '*')
            c++;
          else
            break;
        }
        if (c >= 5) {
          r = 1;
          break;
        }
      }
      if (r) break;
      if ((i % 4) == 3) l++;
    }
    if (r)
      printf("yes\n");
    else
      printf("no\n");
  }
  return 0;
}
