#include <bits/stdc++.h>
using namespace std;
bool isOkay(string s, int index, int n) {
  int i, jump = 1, ans = 0;
  for (i = index + jump; i < n; i += jump) {
    if (index + jump >= n) break;
    if (s[i] == '*') {
      ans++;
      if (ans == 4) return true;
    } else {
      jump++;
      i = index;
      ans = 0;
    }
  }
  return false;
}
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  vector<int> a;
  int i;
  for (i = 0; i < n; i++)
    if (s[i] == '*') a.push_back(i);
  for (i = 0; i < a.size(); i++)
    if (isOkay(s, a[i], n)) {
      cout << "yes";
      return 0;
    }
  cout << "no";
  return 0;
}
