#include <bits/stdc++.h>
using namespace std;
int main() {
  const char col[] = {'W', 'B'};
  vector<vector<char> > arr(8, vector<char>(8));
  for (int i = 0; i < 8; ++i)
    for (int j = 0; j < 8; ++j) cin >> arr[i][j];
  for (int i = 0; i < 8; ++i) {
    if (arr[i][0] != col[i % 2]) {
      rotate(arr[i].begin(), arr[i].begin() + 1, arr[i].end());
    }
  }
  for (int i = 0; i < 8; ++i) {
    for (int j = 0; j < 8; ++j) {
      if (i + 1 < 8 && arr[i][j] == arr[i + 1][j] ||
          j + 1 < 8 && arr[i][j] == arr[i][j + 1]) {
        puts("NO");
        return 0;
      }
    }
  }
  puts("YES");
  return 0;
}
