#include <bits/stdc++.h>
using namespace std;
char str[1005];
int ok = 0;
int main() {
  int n;
  scanf("%d", &n);
  scanf("%s", &str[1]);
  for (int i = 1; i < n; i++) {
    if (str[i] == '*')
      for (int j = 1; j <= 100; j++) {
        if (i + 4 * j <= n && str[i + j] == '*' && str[i + 2 * j] == '*' &&
            str[i + 3 * j] == '*' && str[i + 4 * j] == '*') {
          ok = 1;
          break;
        }
      }
    if (ok) break;
  }
  if (ok)
    printf("yes\n");
  else
    puts("no");
  return 0;
}
