#include <bits/stdc++.h>
using namespace std;
int A[199];
int n;
inline void check(int x, int d) {
  int i = 1;
  for (i = 1; x <= n && i <= 4; i++) {
    if (!A[x]) return;
    x += d;
  }
  if (!A[x]) return;
  if (i == 5) {
    cout << "yes\n";
    exit(0);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    char c;
    cin >> c;
    if (c == '*') A[i] = true;
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) check(i, j);
  cout << "no\n";
}
