#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
int n;
int m;
string s;
int main() {
  cin >> n >> s;
  for (int len = 1; len < n; len++)
    for (int i = 0; i < n; i++) {
      int cur = 0, j = i;
      while (j < n && s[j] == '*') {
        cur++;
        j += len;
      }
      if (cur >= 5) {
        printf("yes\n");
        return 0;
      }
    }
  printf("no\n");
  return 0;
}
