#include <bits/stdc++.h>
using namespace std;
void printpair(int a, int b) {
  cout << "printing first: " << a << " printing second: " << b << endl;
}
char board[8][8];
int checkRow(int row) {
  int match_count = 0, index = 0;
  for (int i = 0; i < 7; i++) {
    if (board[row][i] == board[row][i + 1]) {
      match_count++;
      index = i;
    }
    if (match_count > 1) {
      return -1;
    }
  }
  return index;
}
string solve() {
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      cin >> board[i][j];
    }
  }
  char first;
  int index;
  for (int i = 0; i < 8; i++) {
    index = checkRow(i);
    if (index == -1) {
      return "NO";
    } else {
      if (i == 0) {
        first = board[i][index];
      } else {
        if (index != 0 && (first == board[i][index])) {
          return "NO";
        }
        if (index != 0) {
          first = board[i][index];
        } else {
          first = first == 'W' ? 'B' : 'W';
        }
      }
    }
  }
  return "YES";
}
int main() { cout << solve() << endl; }
