20
.*..*...*....*.....*
 97
****.***.***.*..**.**.*.*.***.*............*..*......*.***.**.*.***.*.***.*..*.**.*.***.**.*****.
 5
*.***
 4
****
 11
.*.*.*.*...
 72
.***.**.*.*...*****.*.*.*.*.**....**.*.**..*.*...**..***.**.**..*.**..**
 89
..**..**..*.********....*.*****.**.****...*......*******..*.**.*****..*..****....*...**..
 6
***.**
 54
...***.*...****.*..****....*..**..**..***.*..**...**..
 100
****************************************************************************************************
 53
*.*.****.*.*......**....**.***.*.*.**.*.*.***...*..*.
 87
*..*..***.**.*...****...*....***....***......*..*.*.*****.**..*.***...*.****..**.*..***
 90
**....****.***..***.*.*****...*.*.***..***.******.**...***..*...*****..*.**.**...*..**...*
 55
...*..*.*.**..*.*....*.****..****....*..***.*****..*..*
 21
*.*...*.*...*.*...*.*
 41
*******....*..*.**..***.*...****.***.*...
 31
.******.**.**....*.*********...
 64
*.***...**...*..*...*....*..***.*.*.*.***.*.**...**.*.*.*..*....
 10
*****....*
 99
**...*.*.*..*....**.***..*...***..***.**.*.....*.*....*...*.**.**.****..**..*.*..*.***....**...**.*
 69
.***...*.***.**...*....*.***.*..*....**.*...**....*.*..**....**..*.**
 99
.*.......................*.......................*.......................*.......................*.
 98
.**..**.*****..***...*.**..*..*....*******..**....*.****.**.*.....*.**..***.**..***.*******..****.
 57
**...*....**.**.*.******.**..**.*.....**.***..***...**..*
 64
***.*...*...*.***.....*.....**.*****.*.*...*..*.*..***..*...***.
 17
*...*...*...*...*
 100
*...............................................................................................****
 11
*...**..*.*
 1
.
 100
*.....................*.....................*.....................*.....................*...........
 56
**.*..*...***.*.**.**..**.*.*.*.**...*.**.**....*...**..
 99
***....*.....****.*.**.*.*.**.*.*.*..*...*..*...***..*.*...*.*...***.*.*...**.**.*******....**....*
 10
.*.*.*.*.*
 51
....****....*........*.*..**........*....****....*.
 17
.*..*..*.....*..*
 97
...*..*...*******.*.**..**..******.*.*..*****.*...***.*.**.**.**..**.******.****.*.***.**..*...**
 42
***.*..*.*.***...**..*..**....**..*..*...*
 5
*****
 42
..*...*.*..**..*.*.*..**...**.***.*.******
 71
**.**..*****.*.*.*.********.....*****.****.*..***...*.*.*.**.****.**.**
 5
.****
 99
.*..**..*..*..**...***.****.*...*....*****.....**..****.*..*....****..**..*****..*....**.*.**..**..
 42
.*.*...*..**.****...****..*.*.***....**...
 10
.*.*.*.*..
 1
*
 5
***.*
 16
*.**.**.**.*..*.
 100
*.......................*.......................*.......................*.......................*...
 7
***.***
 58
**.*.*.**..******.**.*..*.**.*.*******.**.*.**.*..*****.*.
 67
..**.*...*.....****.***.**.*....***..***.*..***.....*******.....*.*
 99
.*.......................*...............................................*.......................*.
 6
......
 11
.**.*..*.**
 15
..........*****
 75
..*.**..*.*****.......*....*.*.*..**.*.***.*.***....******.****.*.....****.
 45
.***..******....***..**..*.*.*.**..**..*.**..
 13
*..*..*..*..*
 5
**.**
 100
*****...............................................................................................
 99
..*.*..**.*.*.******.*.*.**.**.**.*..**.*.*****..*.*.****.*....**....*****.....***..**....***.*.*.*
 99
***************************************************************************************************
 5
****.

no yes no no no yes yes no yes yes yes yes yes yes no yes yes yes yes yes yes yes yes yes yes yes no no no yes yes yes yes no no yes yes yes yes yes no yes yes no no no yes yes no yes yes no no no yes yes yes yes no yes yes yes no
#include <bits/stdc++.h>
using namespace std;
string tostring(int a) {
  ostringstream temp;
  temp << a;
  return temp.str();
}
int sumfromto(int a[], int st, int end) {
  int s = 0;
  for (int i = st; i < end; i++) {
    s += a[i];
  }
  return s;
}
long long sumn(long long p[], int n) {
  int s = 0;
  for (int i = 0; i < n; i++) {
    s += p[i];
  }
  return s;
}
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
void multiply(long long F[2][2], long long M[2][2]);
void power(long long F[2][2], long long n);
long long fib(long long n) {
  long long F[2][2] = {{1, 1}, {1, 0}};
  if (n == 0) return 0;
  power(F, n - 1);
  return F[0][0];
}
void power(long long F[2][2], long long n) {
  if (n == 0 || n == 1) return;
  long long M[2][2] = {{1, 1}, {1, 0}};
  power(F, n / 2);
  multiply(F, F);
  if (n % 2 != 0) multiply(F, M);
}
void multiply(long long F[2][2], long long M[2][2]) {
  long long x = F[0][0] * M[0][0] + F[0][1] * M[1][0];
  long long y = F[0][0] * M[0][1] + F[0][1] * M[1][1];
  long long z = F[1][0] * M[0][0] + F[1][1] * M[1][0];
  long long w = F[1][0] * M[0][1] + F[1][1] * M[1][1];
  F[0][0] = x;
  F[0][1] = y;
  F[1][0] = z;
  F[1][1] = w;
}
int n, m, k, t, h, x, y, z, q;
pair<double, double> p[100];
char alph[26] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
                 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
                 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
int main() {
  cin >> n;
  char* s = new char[2 * n];
  for (int i = 0; i < 2 * n; i++) {
    s[i] = '.';
  }
  for (int i = 0; i < n; i++) {
    cin >> s[i];
  }
  for (int i = 0; i < n; i++) {
    int j = i;
    if (s[j] == '*') {
      int cnt = 0;
      for (int q = 1; q < 25; q++) {
        while (s[j] == s[j + q]) {
          cnt++;
          j = j + q;
          if (cnt >= 5) {
            cout << "yes" << endl;
            return 0;
          }
        }
      }
    }
  }
  cout << "no" << endl;
  return 0;
}
