#include <bits/stdc++.h>
using namespace std;
const int N = 100001;
const long long INF = 1ll << 51;
int n;
string str;
int main() {
  scanf("%d", &n);
  cin >> str;
  for (int i = 0; i < n; ++i) {
    if (str[i] == '*')
      for (int j = 1; j <= n; ++j) {
        int cnt = 0;
        for (int k = i + j; k < n; k += j) {
          if (str[k] == '*')
            ++cnt;
          else
            break;
          if (cnt == 4) {
            cout << "yes" << endl;
            return 0;
          }
        }
      }
  }
  cout << "no" << endl;
  return 0;
}
