#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string a;
  cin >> a;
  for (int i = 0; i < n; i++) {
    if (a[i] == '*') {
      int step = 1;
      while (step + i < n) {
        int length = 1;
        int cur = i + step;
        while (cur < n) {
          if (a[cur] != '*') break;
          if (length == 4) {
            cout << "yes" << endl;
            return 0;
          }
          length++;
          cur += step;
        }
        step++;
      }
    }
  }
  cout << "no" << endl;
  return 0;
}
