#include <bits/stdc++.h>
using namespace std;
char s[5 * 100 + 1];
int main() {
  int beg, step, n;
  bool res = false;
  scanf("%d", &n);
  scanf("%s", s);
  for (beg = n; beg < 5 * n; beg++) s[beg] = '.';
  for (beg = 0; beg < n; beg++)
    for (step = 1; step < n; step++)
      if (s[beg] == '*' && s[beg + step] == '*' && s[beg + 2 * step] == '*' &&
          s[beg + 3 * step] == '*' && s[beg + 4 * step] == '*')
        res = true;
  if (res)
    printf("yes\n");
  else
    printf("no\n");
  return 0;
}
