#include <bits/stdc++.h>
int main() {
  char arr[8][9];
  int check[8] = {0};
  char check1[8];
  int i, j;
  int del = 0;
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 9; j++) {
      scanf("%c", &arr[i][j]);
      if (j != 0) {
        if (arr[i][j] == arr[i][j - 1]) {
          check[i]++;
          check1[i] = arr[i][j];
        }
        if (j == 8 && arr[i][j] == arr[i][0]) {
          check[i]++;
          check1[i] = arr[i][j];
        }
      }
      if (check[i] >= 2) {
        del = 1;
      }
      if (del == 1) break;
    }
    if (del == 1) break;
    if (i != 0) {
      if (check[i] > 0 && check[i - 1] > 0 && check1[i] == check1[i - 1]) {
        del = 1;
        break;
      }
    }
  }
  if (del == 1)
    printf("NO");
  else
    printf("YES");
}
