#include <bits/stdc++.h>
using namespace std;
int n, m, i, j, k, l, a[1009][1009], b[1009][1009], p[1000009], ans, cn, t, x,
    y, z, mx, mn, s;
char c[1009][1009], d[1000009], ch;
void dfs1(int xx, int yy, int pos) {
  a[xx][yy] = pos;
  if ((xx - 2 >= 0) && (yy - 2 >= 0) && (a[xx - 2][yy - 2] == 0)) {
    dfs1(xx - 2, yy - 2, pos + 1);
  }
  if ((xx + 2 < 8) && (yy - 2 >= 0) && (a[xx + 2][yy - 2] == 0)) {
    dfs1(xx + 2, yy - 2, pos + 1);
  }
  if ((xx - 2 >= 0) && (yy + 2 < 8) && (a[xx - 2][yy + 2] == 0)) {
    dfs1(xx - 2, yy + 2, pos + 1);
  }
  if ((xx + 2 < 8) && (yy + 2 < 8) && (a[xx + 2][yy + 2] == 0)) {
    dfs1(xx + 2, yy + 2, pos + 1);
  }
}
void dfs2(int xx, int yy, int pos) {
  b[xx][yy] = pos;
  if ((xx - 2 >= 0) && (yy - 2 >= 0) && (b[xx - 2][yy - 2] == 0)) {
    dfs2(xx - 2, yy - 2, pos + 1);
  }
  if ((xx + 2 < 8) && (yy - 2 >= 0) && (b[xx + 2][yy - 2] == 0)) {
    dfs2(xx + 2, yy - 2, pos + 1);
  }
  if ((xx - 2 >= 0) && (yy + 2 < 8) && (b[xx - 2][yy + 2] == 0)) {
    dfs2(xx - 2, yy + 2, pos + 1);
  }
  if ((xx + 2 < 8) && (yy + 2 < 8) && (b[xx + 2][yy + 2] == 0)) {
    dfs2(xx + 2, yy + 2, pos + 1);
  }
}
int main() {
  while (scanf("%d", &t) != EOF) {
    cn = 0;
    for (i = 0; i < 8; i++) {
      memset(a, 0, sizeof(a));
      memset(b, 0, sizeof(b));
      scanf("%s", c[i]);
      for (j = 0; j < 8; j++) {
        if (c[i][j] == '#') {
          a[i][j] = -(1 << 30);
          b[i][j] = -(1 << 30);
        } else {
          a[i][j] = 0;
          b[i][j] = 0;
        }
        if (c[i][j] == 'K') {
          if (cn == 0) {
            x = i;
            y = j;
            cn++;
          } else {
            z = i;
            s = j;
          }
        }
      }
    }
    dfs1(x, y, 1);
    dfs2(z, s, 1);
    ans = 0;
    for (i = 0; i < 8; i++) {
      for (j = 0; j < 8; j++) {
        if ((b[i][j] != -(1 << 30)) && (b[i][j] != 0) &&
            (a[i][j] != -(1 << 30)) && (a[i][j] != 0) &&
            (a[i][j] % 2 == b[i][j] % 2)) {
          ans = 1;
        }
      }
    }
    if (ans == 1) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
  }
  return 0;
}
