#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  char s[100];
  scanf("%d %s", &n, &s);
  for (int i = 0; i < n; i++)
    for (int j = 1; j <= 100; j++) {
      int t = 0;
      for (int k = i; k < n && t < 5 && s[k] == '*'; t++, k += j)
        ;
      if (t == 5) {
        printf("yes");
        return 0;
      }
    }
  printf("no");
  return 0;
}
