#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1e9 + 7;
const int MXN = (int)1e6 + 10;
const double EPS = (double)1e-9;
char s[10001];
int n;
bool boo;
int main() {
  scanf("%d\n%s", &n, &s);
  for (int i = 0; i < n; ++i) {
    for (int j = 1; i + 4 * j < n; ++j) {
      boo = true;
      for (int k = 0; k < 5; ++k) {
        if (s[i + k * j] == '.') {
          boo = false;
          break;
        }
      }
      if (boo) {
        printf("yes");
        return 0;
      }
    }
  }
  printf("no");
  return 0;
}
