#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const double PI = 3.141592653589793238463;
const int N = 1e6 + 10;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int x;
  cin >> x;
  string s;
  cin >> s;
  vector<int> v;
  for (int i = 0; i < x; i++) {
    if (s[i] == '*') v.push_back(i);
  }
  for (int i = 0; i < v.size(); i++) {
    int a[105] = {0};
    int c = 0;
    for (int j = i + 1; j < v.size(); j++) {
      a[v[j] - v[i]]++;
    }
    for (int m = 1; m <= 25; m++) {
      c = 0;
      for (int k = m; k <= 100; k += m) {
        if (a[k]) {
          c++;
          if (c == 4) {
            cout << "yes\n";
            return 0;
          }
        } else
          break;
      }
    }
  }
  cout << "no\n";
  return 0;
}
