#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    char str[110];
    cin >> str;
    for (int beg = 0; beg < n; beg++) {
      for (int d = 1; d < n; d++) {
        int c = 0;
        int pos = beg;
        while (pos < n && str[pos] == '*') {
          c++;
          pos += d;
        }
        if (c >= 5) {
          cout << "yes" << endl;
          return 0;
        }
      }
    }
    cout << "no" << endl;
  }
  return 0;
}
