#include <bits/stdc++.h>
using namespace std;
char base[10][10];
int a, b;
int main() {
  for (a = 1; a <= 8; a++) scanf("%s", base[a] + 1);
  int sum = 0;
  for (a = 1; a <= 8; a++)
    for (b = 2; b <= 8; b++)
      if (base[a][b] == base[a][b - 1]) {
        printf("NO\n");
        return 0;
      }
  printf("YES\n");
}
