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