#include <bits/stdc++.h>
using namespace std;
char ch[100100];
int n;
bool judge(int whe1, int whe2) {
  bool yess = 1;
  yess &= (ch[whe1] == '*');
  whe1 += whe2;
  yess &= (ch[whe1] == '*');
  whe1 += whe2;
  yess &= (ch[whe1] == '*');
  whe1 += whe2;
  yess &= (ch[whe1] == '*');
  whe1 += whe2;
  yess &= (ch[whe1] == '*');
  return yess;
}
int main() {
  cin >> n;
  scanf("%s", ch + 1);
  bool yes = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++)
      if (judge(j, i)) {
        yes = 1;
        break;
      }
    if (yes) break;
  }
  if (yes)
    printf("yes");
  else
    printf("no");
}
