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