#include <bits/stdc++.h>
using namespace std;
const int inf = INT_MAX;
const long long inf_ll = 0x7f7f7f7f;
const double eps = 1e-8;
const int bfs_dy[] = {-1, -1, -1, 0, 0, 1, 1, 1};
const int bfs_dx[] = {-1, 0, 1, -1, 1, -1, 0, 1};
const int dfs_dy[] = {0, 1, 0, -1};
const int dfs_dx[] = {1, 0, -1, 0};
pair<int, int> dir[] = {make_pair(0, 1), make_pair(1, 0), make_pair(0, -1),
                        make_pair(-1, 0)};
int main() {
  int n;
  cin >> n;
  string a;
  cin >> a;
  for (int i = 0; i < n; i++) {
    if (a[i] == '*') {
      for (int j = i + 1; j < n; j++) {
        if (a[j] == '*') {
          int step = j - i;
          int cnt = 2;
          for (int k = j + step; k < n; k += step) {
            if (a[k] == '*') {
              cnt++;
            } else {
              break;
            }
            if (cnt == 5) {
              cout << "yes" << endl;
              return 0;
            }
          }
        }
      }
    }
  }
  cout << "no" << endl;
  return 0;
}
