#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  int r;
  while (b != 0) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
int lcm(int a, int b) { return a / gcd(a, b) * b; }
int getBit(int s, int i) { return (s >> i) & 1; }
int onBit(int s, int i) { return s | (int(1) << i); }
int offBit(int s, int i) { return s & (~(int(1) << i)); }
int cntBit(int s) { return __builtin_popcount(s); }
int sqr(int x) { return x * x; };
const int MOD = 1e9 + 7;
const int SIZE = 1e6 + 10;
const int DX[4] = {-1, 1, 0, 0};
const int DY[4] = {0, 0, 1, -1};
string s;
int n;
bool isGood(int len) {
  for (int start = (0), _b = (n); start < _b; ++start)
    if (s[start] == '*') {
      int cnt = 0;
      int i = start;
      while (i < n && s[i] == '*') {
        cnt++;
        i += len;
      }
      if (cnt >= 5) return true;
    }
  return false;
}
int main() {
  scanf("%d\n", &n);
  cin >> s;
  for (int len = (1), _b = (n - 1); len <= _b; len++)
    if (isGood(len)) {
      cout << "yes";
      return 0;
    }
  cout << "no";
  return 0;
}
