#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  char s[150];
  cin >> s;
  bool ans = false;
  for (int p = 0; p < n && !ans; p++)
    for (int d = 1; p + 4 * d < n && !ans; d++) {
      bool ok = true;
      for (int i = 0; i < 5 && ok; i++)
        if (s[p + d * i] != '*') ok = false;
      if (ok) ans = true;
    }
  if (ans)
    cout << "yes" << endl;
  else
    cout << "no" << endl;
  return 0;
}
