#include <bits/stdc++.h>
using namespace std;
const int inf = (1 << 30) - 1;
const int mod = 1000000007;
int n;
char s[105];
int main() {
  scanf("%d\n", &n);
  scanf("%s", s);
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      int d = j - i;
      if (j + d + d + d < n && s[i] == '*' && s[j] == '*' && s[j + d] == '*' &&
          s[j + d + d] == '*' && s[j + d + d + d] == '*') {
        puts("yes");
        return 0;
      }
    }
  }
  puts("no");
  return 0;
}
