#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  bool ans = false;
  for (int i = 1; i <= n; ++i)
    for (int start = 0; start < n; ++start) {
      int jump = 0;
      int cur = start;
      while (cur < n && s[cur] == '*') {
        jump += 1;
        cur += i;
      }
      if (jump >= 5) ans = true;
    }
  if (ans)
    cout << "yes" << endl;
  else
    cout << "no" << endl;
}
int main() {
  solve();
  return 0;
}
