#include <bits/stdc++.h>
using namespace std;
char s[110];
int main() {
  int n;
  scanf("%d%s", &n, s);
  int l = n / 4;
  for (int i = 0; i < n; i++) {
    if (s[i] == '.') continue;
    for (int j = 1; j <= l; j++) {
      int cnt = 0;
      for (int k = i; k < n; k += j) {
        if (s[k] == '*')
          cnt++;
        else
          cnt = 0;
        if (cnt >= 5) {
          puts("yes");
          return 0;
        }
      }
    }
  }
  puts("no");
  return 0;
}
