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