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