#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  while (cin >> n >> s) {
    bool ok = 0;
    for (int i = 0; i < n; ++i) {
      for (int L = 1; L <= 100; ++L) {
        int cnt = 0;
        for (int k = 0; k < 5; ++k)
          if (i + k * L < n && s[i + k * L] == '*') cnt++;
        if (cnt == 5) ok = 1;
      }
    }
    puts(ok ? "yes" : "no");
  }
}
