#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string level;
  cin >> level;
  for (int s = 0; s < n; ++s) {
    for (int i = 1; i <= 25; ++i) {
      bool possible = true;
      int count = 5;
      for (int j = s; j < n; j += i) {
        if (level[j] == '.') {
          possible = false;
          break;
        } else {
          count--;
          if (count == 0) break;
        }
      }
      if (possible && count == 0) {
        cout << "yes" << endl;
        return 0;
      }
    }
  }
  cout << "no" << endl;
  return 0;
}
