#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  string s;
  cin >> s;
  bool yes = false;
  for (int i = 0; i < n; i++)
    for (int st = 1; st < n; st++)
      if (s[i] == '*') {
        int len = 1;
        int d = i;
        while (d + st < s.length() && s[d + st] == '*') {
          d += st;
          len++;
        }
        if (len > 4) {
        }
        if (len > 4) yes = true;
      }
  cout << ((yes) ? "yes\n" : "no\n");
  cin.get();
  cin.get();
  return 0;
}
