#include <bits/stdc++.h>
const long long INF = (long long)1e18 + 2;
using namespace std;
void solve();
void fastIO() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
int main() {
  fastIO();
  solve();
}
void solve() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  bool flag = false;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      int cnt = 0;
      for (int k = i; k <= n; k += j) {
        if (s[k - 1] == '*')
          cnt++;
        else
          break;
      }
      if (cnt >= 5) {
        flag = true;
        break;
      }
    }
    if (flag) break;
  }
  if (flag)
    cout << "yes";
  else
    cout << "no";
}
