#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  char a[101];
  cin >> a;
  for (int i = 1; i < 25; i++) {
    for (int j = 0; j < n; j++) {
      if (a[j] == '*' && a[j + i] == '*' && a[j + (2 * i)] == '*' &&
          a[j + (3 * i)] == '*' && a[j + (4 * i)] == '*') {
        cout << "yes";
        return 0;
      }
    }
  }
  cout << "no";
  return 0;
}
