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