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