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