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