#include <bits/stdc++.h>
using namespace std;
const int M = 1e5;
const int Q = 1e9 + 7;
int main() {
  srand(time(NULL));
  int n;
  char s[200];
  scanf("%d", &n);
  scanf("%s", s);
  for (int i = 0; i < n; i++) {
    for (int j = 1; j < n; j++) {
      int tq, k = i;
      for (tq = 0; tq < 5; tq++) {
        if (k >= n || s[k] == '.') break;
        k += j;
      }
      if (tq == 5) {
        cout << "yes" << endl;
        return 0;
      }
    }
  }
  cout << "no" << endl;
  return 0;
}
