#include <bits/stdc++.h>
using namespace std;
inline int _Int() {
  char INPUT[15];
  scanf("%s", INPUT);
  return atoi(INPUT);
}
long long int bigMod(long long int A, long long int P, int M) {
  long long int R = 1;
  for (A %= M; P; P >>= 1) {
    if (P & 1) R = (R * A) % M;
    A = (A * A) % M;
  }
  return R;
}
long long int bigMul(long long int A, long long int B, long long int M) {
  long long int R = 0;
  for (A %= M; B; B >>= 1) {
    if (B & 1) R = (R + A) % M;
    A = (A + A) % M;
  }
  return R;
}
unsigned long long int _pow(unsigned long long int A, int P) {
  unsigned long long int R = 1;
  for (; P; P >>= 1) {
    if (P & 1) R = (R * A);
    A = (A * A);
  }
  return R;
}
template <class T>
T GCD(T x, T y) {
  while (x) x ^= y ^= x ^= y %= x;
  return y;
}
char s[300];
void Main() {
  int n = _Int();
  scanf("%s", s + 1);
  for (int d = 1; d <= n; d++) {
    for (int i = 1; i <= n; i++) {
      if (s[i] == '*') {
        int cnt = 0, loop = 0;
        for (int j = i; loop < 5; j += d, loop++) {
          if (s[j] != '*') break;
        }
        if (loop == 5) {
          printf("yes");
          return;
        }
      }
    }
  }
  printf("no");
}
int main() {
  Main();
  return 0;
}
