#include <bits/stdc++.h>
using namespace std;
bool vis[101];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(nullptr);
  long long int n;
  cin >> n;
  string s;
  cin >> s;
  for (int i = 0; i < n; i++) {
    if (s[i] == '.')
      vis[i] = 0;
    else
      vis[i] = 1;
  }
  int f = 0;
  for (int i = 1; i < 26; i++) {
    int ff = 1;
    for (int j = 0; j < n; j++) {
      ff = 1;
      if ((j + 4 * i) >= n) {
        ff = 0;
        break;
      }
      if (vis[j] == 0) ff = 0;
      if (vis[j + i] == 0) ff = 0;
      if (vis[j + i + i] == 0) ff = 0;
      if (vis[j + i + i + i] == 0) ff = 0;
      if (vis[j + i + i + i + i] == 0) ff = 0;
      if (ff == 1) {
        f = 1;
        break;
      }
    }
    if (ff == 1) {
      f = 1;
      break;
    }
  }
  if (f)
    cout << "yes";
  else
    cout << "no";
  return 0;
}
