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