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