#include <bits/stdc++.h>
int main(void) {
  int n, max_single_jump_length, single_jump_length, all_jump_length,
      max_start_position, start_position, finish_position, jump_position;
  char map[102] = {0};
  scanf("%d", &n);
  scanf("%s", map + 1);
  max_single_jump_length = (n - 1) / 4;
  for (single_jump_length = 1; single_jump_length <= max_single_jump_length;
       single_jump_length++) {
    all_jump_length = 4 * single_jump_length;
    max_start_position = n - all_jump_length;
    for (start_position = 1; start_position <= max_start_position;
         start_position++) {
      finish_position = start_position + all_jump_length;
      for (jump_position = start_position; jump_position <= finish_position;
           jump_position += single_jump_length) {
        if (map[jump_position] == '.') break;
      }
      if (jump_position > finish_position) {
        printf("yes");
        return 0;
      }
    }
  }
  printf("no");
  return 0;
}
