#include <bits/stdc++.h>
char in[104];
int main() {
  int i, j, k, n;
  bool f = 0;
  scanf("%d %s", &n, in + 1);
  for (i = 1; i <= n; ++i) {
    if (in[i] != '*') continue;
    for (k = 1; (k << 2) + i <= n; ++k) {
      for (j = 1; j <= 4; ++j) {
        if (in[i + k * j] != '*') break;
      }
      if (j == 5) {
        f = 1;
        break;
      }
    }
    if (f) break;
  }
  if (f)
    puts("yes");
  else
    puts("no");
  return 0;
}
