#include <bits/stdc++.h>
using namespace std;
int main() {
  int size1;
  string s;
  vector<int> v;
  int arr[200];
  cin >> size1 >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '*') v.push_back(i + 1);
  }
  for (int i = 0; i < v.size(); i++) {
    for (int count1 = 1; count1 <= 100; count1++) {
      int n = v[i] + count1;
      int counttimes = 0;
      for (int l = i + 1; l < v.size(); l++) {
        if (counttimes == 4) {
          cout << "yes";
          return 0;
        }
        if (n == v[l]) {
          n = v[l] + count1;
          counttimes++;
        }
        if (v[l] > n) break;
      }
      if (counttimes == 4) {
        cout << "yes";
        return 0;
      }
    }
  }
  cout << "no";
  return 0;
}
