#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, cnt, n, flg;
  flg = 0;
  string s;
  cin >> n >> s;
  for (i = (0); i < (n); ++i) {
    for (j = (1); j < (n); ++j) {
      k = i;
      cnt = 0;
      while (k < n && cnt < 6 && s[k] != '.') {
        k += j;
        cnt++;
      }
      if (cnt == 5) {
        flg = 1;
        break;
      }
    }
    if (flg == 1) break;
  }
  if (flg)
    cout << "yes" << endl;
  else
    cout << "no" << endl;
}
