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