#include <bits/stdc++.h>
using namespace std;
int n, i, j, ok, v[500];
string s;
void verifica(int start, int pas) {
  int steps = 0;
  int oktura = 1;
  while (steps < 4) {
    start = start + pas;
    if (v[start] == 0) oktura = 0;
    steps++;
  }
  if (oktura) ok = 1;
}
int main() {
  cin >> n;
  cin >> s;
  for (i = 1; i <= n; i++) {
    if (s[i - 1] == '*')
      v[i] = 1;
    else
      v[i] = 0;
  }
  ok = 0;
  for (i = 1; i <= n / 2 and ok == 0; i++) {
    for (j = 1; j <= n; j++) {
      if (v[j] == 1) verifica(j, i);
    }
  }
  if (ok)
    cout << "yes";
  else
    cout << "no";
}
