#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  char *str = new char[N];
  cin >> str;
  if (N < 5) {
    cout << "no" << endl;
    return 0;
  }
  for (int i = 0; i <= N - 5; i++) {
    if (str[i] == '.') continue;
    bool find = false;
    int sj = i + 1;
    while (sj <= N - 4) {
      int j = sj;
      for (; j < N; j++) {
        if (str[j] == '*') {
          find = true;
          break;
        }
      }
      if (!find) {
        cout << "no" << endl;
        return 0;
      }
      int count = 1;
      int k = j;
      while (str[k] == '*') {
        count++;
        k += j - i;
        if (k >= N || count == 5) break;
      }
      if (count == 5) {
        cout << "yes" << endl;
        return 0;
      } else {
        sj++;
      }
    }
  }
  cout << "no" << endl;
  return 0;
}
