#include <bits/stdc++.h>
using namespace std;
int n, k, a, b, x, y, i = 1, j, l;
string s;
int main() {
  cin >> n >> s;
  while (i <= n / 4) {
    while (j < n) {
      l = j;
      while (l < n) {
        if (s[l] == '*') {
          x++;
          if (x == 5) {
            cout << "yes";
            return 0;
          }
        } else {
          x = 0;
        }
        l += i;
      }
      l = 0;
      j++;
      x = 0;
    }
    i++;
    j = 0;
  }
  cout << "no";
}
