#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  char a[111];
  cin >> n >> a;
  for (int i = 0; i < n; ++i) {
    if (a[i] != '*') continue;
    for (int j = i + 1; j < n; ++j) {
      if (a[j] != '*') continue;
      int d = j - i;
      int f = 1;
      for (int k = 1; k < 4; ++k) {
        if (a[j + k * d] != '*') f = 0;
      }
      if (f) {
        cout << "yes\n";
        return 0;
      }
    }
  }
  cout << "no\n";
  return 0;
}
