#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:66777216")
using namespace std;
long long n, m, x, y, z;
int a[105];
int main() {
  cin >> n;
  string s;
  cin >> s;
  for (int i = 1; i < n; i++) {
    for (int c = 0; c < n; c++) {
      int ans = 0;
      for (int k = c; k < n; k += i) {
        if (s[k] == '*')
          ans++;
        else
          break;
      }
      if (ans >= 5) {
        cout << "yes";
        return 0;
      }
    }
  }
  cout << "no";
  return 0;
}
