#include <bits/stdc++.h>
using namespace std;
bool debug;
const int inf = 1e9 + 5;
const long long INF = (long long)inf * inf;
const int nax = 1e6 + 5;
int n;
char sl[nax];
bool ok(int i) { return i < n && sl[i] == '*'; }
int main(int argc, char *argv[]) {
  debug = argc > 1;
  scanf("%d", &n);
  scanf("%s", sl);
  for (int i = 0; i <= (n)-1; ++i)
    for (int j = i + 1; j <= n - 1; ++j) {
      int d = j - i;
      if (ok(i) && ok(j) && ok(j + d) && ok(j + 2 * d) && ok(j + 3 * d)) {
        puts("yes");
        return 0;
      }
    }
  puts("no");
  return 0;
}
