#include <bits/stdc++.h>
using namespace std;
int n, sum;
char a[110];
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    if (a[i] == '*') sum++;
  }
  if (sum < 5) {
    cout << "no";
    return 0;
  }
  for (int ln = 1; ln <= n; ++ln) {
    for (int i = 1; i <= n; ++i) {
      if (a[i] == '*') {
        int c = 0;
        for (int j = i; j <= n; j += ln) {
          if (a[j] == '*')
            ++c;
          else
            break;
          if (c >= 5) {
            cout << "yes";
            return 0;
          }
        }
      }
    }
  }
  cout << "no";
  return 0;
}
