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;
template <class T>
T gcd(T a, T b) {
  T r;
  while (b != 0) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
template <class T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
template <class T>
int getbit(T s, int i) {
  return (s >> i) & 1;
}
template <class T>
T onbit(T s, int i) {
  return s | (T(1) << i);
}
template <class T>
T offbit(T s, int i) {
  return s & (~(T(1) << i));
}
const double PI = 2 * acos(0.0);
const double eps = 1e-9;
const int infi = 1e9;
const long long Linfi = (long long)1e18;
const long long MOD = 1000000007;
const int c1 = 31;
int n;
string s;
vector<int> V;
void solve() {
  for (int i = 1; i <= n; i++)
    if (s[i] == '*') V.push_back(i);
  if (V.size() >= 5) {
    for (int i = 0; i < V.size(); i++)
      for (int j = i + 1; j < V.size(); j++)
        for (int k = j + 1; k < V.size(); k++)
          for (int h = k + 1; h < V.size(); h++)
            for (int l = h + 1; l < V.size(); l++) {
              int tmp = V[j] - V[i];
              if (tmp == V[k] - V[j] && tmp == V[h] - V[k] &&
                  tmp == V[l] - V[h]) {
                cout << "yes" << endl;
                return;
              }
            }
  }
  cout << "no" << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  cin >> s;
  s = '0' + s;
  solve();
  return 0;
}
