#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  cin >> n >> s;
  for (int d = 1; d < n; d++)
    for (int i = 0; i + 4 * d < n; i++)
      if (s[i] == '*' && s[i] == s[i + d] && s[i] == s[i + 3 * d] &&
          s[i] == s[i + 4 * d] && s[i] == s[i + 2 * d]) {
        cout << "yes";
        return 0;
      }
  cout << "no";
  return 0;
}
