#include <bits/stdc++.h>
using namespace std;
const long long OO = 1e9 + 7;
int main() {
  int n, m;
  while (cin >> n) {
    string s;
    cin >> s;
    for (int k = 1; k < n; k++) {
      for (int j = 0; j < n; j++) {
        int cnt = 0;
        for (int i = j; i < n; i += k) {
          if (s[i] == '*')
            cnt++;
          else
            break;
        }
        if (cnt >= 5) {
          cout << "yes";
          return 0;
        }
      }
    }
    cout << "no";
  }
  return 0;
}
