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