#include <bits/stdc++.h>
using namespace std;
int LIS(vector<int> A) {
  int N = A.size(), i;
  multiset<int> s;
  multiset<int>::iterator k;
  for (i = 0; i < N; i++) {
    s.insert(A[i]);
    if (1) {
      k = s.find(A[i]);
      k++;
      if (k != s.end()) s.erase(k);
    }
  }
  return s.size();
}
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  for (int i = 1; i < n; i++) {
    for (int j = 0; j + 4 * i < n; j++) {
      if (s[j] != '*') continue;
      if (s[j + i] == s[j] && s[j + 2 * i] == s[j] && s[j + 3 * i] == s[j] &&
          s[j + 4 * i] == s[j]) {
        cout << "yes";
        return 0;
      }
    }
  }
  cout << "no";
}
