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