#include <bits/stdc++.h>
using namespace std;
string str;
int n, i, x, k, t, j;
int main() {
  cin >> n;
  cin >> str;
  for (k = 1; k <= n; k++) {
    for (i = 0; i < n; i++) {
      t = 0;
      for (j = i; j < n; j += k) {
        if (str[j] == '.') break;
        t++;
      }
      if (t >= 5) return cout << "yes" << '\n', 0;
    }
  }
  cout << "no" << '\n';
}
