#include <bits/stdc++.h>
using namespace std;
int main() {
  string s[3] = {"WBWBWBWB", "BWBWBWBW", ""};
  bool flag = 1;
  for (int i = 0; i < 8; i++) {
    cin >> s[2];
    if ((s[2] != s[1]) && (s[2] != s[0])) flag = 0;
  }
  cout << (flag ? "YES" : "NO") << endl;
}
