#include <bits/stdc++.h>
char str[9][9], ch1, ch2;
int i, j, temp = 0, d;
int main() {
  for (i = 0; i < 8; i++) scanf("%s", &str[i]);
  for (i = 0; i < 8; i++) {
    ch1 = str[i][0];
    ch2 = str[i][1];
    for (j = 2; j < 8; j++) {
      d = j % 2;
      if (ch1 != ch2) {
        if (d == 0 && str[i][j] == ch1)
          temp = 0;
        else if (d == 1 && str[i][j] == ch2)
          temp = 0;
        else {
          temp = 1;
          break;
        }
      } else {
        temp = 1;
        break;
      }
    }
    if (temp == 1) break;
  }
  if (temp == 0)
    printf("YES");
  else
    printf("NO");
}
