#include <bits/stdc++.h>
int main(void) {
  int n;
  char level[105];
  int aux;
  int ok = 0;
  scanf(" %d", &n);
  scanf(" %s", level);
  for (int i = 0; i < n; i++) {
    for (int j = 1; j < n; j++) {
      aux = 0;
      for (int k = i; k < n; k += j) {
        if (level[k] == '*') {
          aux++;
        } else {
          break;
        }
      }
      if (aux >= 5) {
        ok = 1;
        i = n;
        break;
      }
    }
  }
  if (ok) {
    printf("yes\n");
  } else {
    printf("no\n");
  }
  return 0;
}
