#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  for (int i = 0; i < 100; i++) {
    s += '-';
  }
  bool ok = false;
  for (int i = 0; i < n; i++) {
    if (s[i] == '*') {
      for (int j = i + 1; j < n; j++) {
        int dist = j - i;
        if (s[j] == '*' && s[j + dist] == '*' && s[j + 2 * dist] == '*' &&
            s[j + 3 * dist] == '*') {
          ok = true;
        }
      }
    }
  }
  if (ok)
    cout << "yes\n";
  else
    cout << "no\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
