#include <bits/stdc++.h>
using namespace std;
const int INF = 1E9;
int main() {
  int n;
  string s;
  cin >> n >> s;
  for (int len = 1; len <= n; len++) {
    bool ok = true;
    for (int i = 0; i < n; i++) {
      if (i + len * 4 < n && s[i] == '*' && s[i] == s[i + len] &&
          s[i] == s[i + len + len] && s[i] == s[i + len * 3] &&
          s[i] == s[i + len * 4]) {
        ok = 0;
        break;
      }
    }
    if (!ok) {
      puts("yes");
      return 0;
    }
  }
  puts("no");
  return 0;
}
