#include <bits/stdc++.h>
int main() {
  int i, j, k, n, m, t;
  char a[8][9];
  for (i = 0; i < 8; i++) scanf("%s", a[i]);
  k = 0;
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 7; j++) {
      if (a[i][j] == a[i][j + 1]) {
        k = 1;
        break;
      }
    }
    if (k == 1) {
      break;
    }
  }
  if (k == 1)
    printf("NO\n");
  else
    printf("YES\n");
}
