#include <bits/stdc++.h>
using namespace std;
void _solve() {
  int n;
  cin >> n;
  char arr[120];
  vector<int> V;
  int maxi;
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
    if (arr[i] == '*') {
      V.push_back(i);
      maxi = i;
    }
  }
  int size = V.size();
  bool flag = false;
  for (int i = 0; i < size; i++) {
    for (int j = i + 1; j < size; j++) {
      int dif = V[j] - V[i];
      int count = 0;
      int x = V[j];
      while (x + dif <= maxi) {
        if (arr[x + dif] != '*') break;
        x += dif;
        count++;
      }
      if (count == 3) {
        flag = true;
        break;
      }
    }
    if (flag) break;
  }
  if (flag)
    cout << "yes" << endl;
  else
    cout << "no" << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  _solve();
  return 0;
}
