#include <bits/stdc++.h>
using namespace std;
int solve(string s) {
  for (size_t i = 1; i <= s.size() / 4; i++) {
    for (size_t j = 0; j <= s.size() - 4 * i + 1; j++) {
      size_t k;
      for (k = 0; k < 5; k++) {
        if (j + i * k >= s.size() || s[j + i * k] == '.') break;
      }
      if (k == 5) return 1;
    }
  }
  return 0;
}
int main() {
  int n;
  string s;
  cin >> n >> s;
  cout << (solve(s) == 1 ? "yes" : "no");
}
