#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:128777216")
using namespace std;
const long long LINF = 1000000000000000000LL;
const int INF = 1000000000;
const long double eps = 1e-9;
const long double PI = 3.1415926535897932384626433832795l;
void prepare(string s) {
  if (s.length() != 0) {
    freopen((s + ".in").c_str(), "r", stdin);
    freopen((s + ".out").c_str(), "w", stdout);
  }
}
const int NMAX = 155;
int n;
char s[NMAX];
void read() {
  scanf("%d\n", &n);
  scanf("%s", s);
}
void solve() {
  for (int i = 0; i < (int)(n); i++) {
    if (s[i] == '*') {
      for (int j = 1; j <= n; j++) {
        bool ok = true;
        int c = 0;
        for (int k = i; c < 5 && k < n; k += j, c++) {
          ok = ok && s[k] == '*';
        }
        if (ok && c == 5) {
          printf("yes\n");
          return;
        }
      }
    }
  }
  printf("no\n");
}
int main() {
  prepare("");
  read();
  solve();
  return 0;
}
