#include <bits/stdc++.h>
using namespace ::std;
int n, t, s, f;
int a[102];
bool go(int from, int step) {
  if (a[from] && (from + step < n && a[from + step]) &&
      (from + 2 * step < n && a[from + 2 * step]) &&
      (from + 3 * step < n && a[from + 3 * step]) &&
      (from + 4 * step < n && a[from + 4 * step]))
    return true;
  else
    return false;
}
int main(int argc, const char* argv[]) {
  ios::sync_with_stdio(0);
  cin >> n;
  char x;
  for (int i = 0; i < n; i++) {
    cin >> x;
    if (x == '*') a[i] = 1;
  }
  int st = 0;
  while (a[st] != 1) st++;
  while (st + 2 < n) {
    if (a[st])
      for (int i = 1; i <= (n - st + 1) / 4; i++) {
        if (go(st, i)) {
          cout << "yes\n";
          return 0;
        }
      }
    st++;
  }
  cout << "no\n";
  return 0;
}
