#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int N;
  cin >> N;
  cin.ignore(1, '\n');
  string level;
  cin >> level;
  bool possible = false;
  for (int jlen = 1; jlen <= N; jlen++) {
    for (int start = 0; start < N; start++) {
      if (level[start] == '*') {
        int p = 1;
        int current = start;
        while (current + jlen < N && level[current + jlen] == '*') {
          current += jlen;
          p++;
        }
        if (p >= 5) {
          possible = true;
          break;
        }
      }
    }
    if (possible) break;
  }
  if (possible)
    cout << "yes\n";
  else
    cout << "no\n";
  return 0;
}
