#include <bits/stdc++.h>
using namespace std;
int n, d[128][128][8];
string s;
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> s;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++)
      for (int k = 0; k <= 4; k++) {
        if (s[i - 1] == '.') continue;
        if (!k) {
          d[i][j][k] = 1;
          continue;
        }
        if (i >= j) d[i][j][k] |= d[i - j][j][k - 1];
        if (k == 4 && d[i][j][k]) {
          cout << "yes" << endl;
          return 0;
        }
      }
  cout << "no" << endl;
}
