#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline T sqr(const T &x) {
  return x * x;
}
const int N_MAX = 20000;
const int SUP_I = (int)1e+9;
const unsigned long long int SUP_LL = (unsigned long long int)1e+16;
const double EPS = 1e-6;
int main() {
  int n;
  cin >> n;
  char c;
  vector<int> a;
  for (int i = 0; i < n; i++) {
    cin >> c;
    if (c == '*') a.push_back(i);
  }
  bool f = false;
  if (a.size() >= 5) {
    for (int i1 = 0; i1 < a.size() - 4 && !f; i1++) {
      for (int i2 = i1 + 1; i2 < a.size() - 3 && !f; i2++) {
        for (int i3 = i2 + 1; i3 < a.size() - 2 && !f; i3++) {
          for (int i4 = i3 + 1; i4 < a.size() - 1 && !f; i4++) {
            for (int i5 = i4 + 1; i5 < a.size() && !f; i5++) {
              int delux = a[i2] - a[i1];
              f = (a[i5] - a[i4] == delux && a[i4] - a[i3] == delux &&
                   a[i3] - a[i2] == delux);
            }
          }
        }
      }
    }
  }
  if (f)
    cout << "yes" << endl;
  else
    cout << "no" << endl;
  return 0;
}
