#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  char arr[110] = {NULL};
  cin >> arr;
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j < n; j++) {
      int sz = 0;
      for (int k = j; k < n; k += i) {
        if (arr[k] == '.') {
          break;
        } else {
          sz++;
          if (sz == 5) {
            printf("yes\n");
            return 0;
          }
        }
      }
    }
  }
  printf("no\n");
}
