#include <bits/stdc++.h>
using namespace std;
char chess[8][8];
int main() {
  for (int i = 0; i < 8; i++) scanf("%s", chess[i]);
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 7; j++) {
      if (chess[i][j] == chess[i][j + 1]) {
        printf("NO\n");
        return 0;
      }
    }
  }
  printf("YES\n");
  return 0;
}
