#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int cnt = 0;
  cin >> n;
  string s;
  cin >> s;
  for (int i = 0; i < n; i++) {
    if (s[i] == '*') {
      for (int j = 1; j < n; j++) {
        cnt = 0;
        for (int k = i + j; k < n; k += j) {
          if (s[k] == s[i])
            cnt++;
          else
            break;
          if (cnt == 4) {
            cout << "yes";
            return 0;
          }
        }
      }
    }
  }
  cout << "no";
  return 0;
}
