#include <bits/stdc++.h>
using namespace std;
string s;
int n;
int ok = 0;
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  cin >> s;
  for (int i = 0; i <= n - 5; i++) {
    if (s[i] == '*') {
      for (int j = 1; j <= n; j++) {
        int now = i, total = 0;
        while (now < n && s[now] == '*' && total < 5) {
          total++;
          now = now + j;
        }
        if (total == 5) {
          ok = 1;
          goto output;
        }
      }
    }
  }
output:
  if (ok) {
    cout << "yes";
  } else
    cout << "no";
  return 0;
}
