#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  vector<int> a;
  for (int i = 0; i < n; i++)
    if (s[i] == '*') a.push_back(i);
  for (int i = a.size() - 1; i >= 0; i--) {
    for (int j : a) {
      if (j == a[i]) continue;
      int d = (a[i] - j) / 4;
      if ((a[i] - j) % 4 == 0)
        for (int k = 1; k < 4; k++) {
          if (s[j + d * k] != '*') break;
          if (k == 3 && s[j + d * k] == '*') {
            cout << "yes";
            return 0;
          }
        }
    }
  }
  cout << "no";
  return 0;
}
