#include <bits/stdc++.h>
using namespace std;
int main() {
  bool ans = 0;
  int n;
  char a[200];
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  int t;
  for (int i = 0; i < n; i++) {
    if (a[i] == '.') continue;
    for (int j = 1; j < n; j++) {
      t = 0;
      for (int k = 1; k <= 4; k++) {
        if (i + j * k >= n) break;
        if (a[i + j * k] == '*') t++;
      }
      if (t == 4) {
        ans = 1;
        break;
      }
    }
    if (ans) break;
  }
  if (ans)
    cout << "yes\n";
  else
    cout << "no\n";
}
