#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string str;
  cin >> n;
  cin.get();
  cin >> str;
  for (int i = 0; i < n; ++i) {
    if (str[i] != '*') continue;
    for (int j = 1; j < 30; ++j) {
      int nj = 0;
      int cur = i;
      while (nj < 4 && cur < n && cur + j < n && str[cur + j] != '.') {
        cur += j;
        ++nj;
      }
      if (nj == 4) {
        cout << "yes" << endl;
        return 0;
      }
    }
  }
  cout << "no" << endl;
  return 0;
}
