#include <bits/stdc++.h>
using namespace std;
bool x(string a) { return (a == "BWBWBWBW" || a == "WBWBWBWB"); }
int main() {
  string a, b, c, d, e, f, g, h;
  cin >> a >> b >> c >> d >> e >> f >> g >> h;
  if (x(a) && x(b) && x(c) && x(d) && x(e) && x(f) && x(g) && x(h))
    cout << "YES";
  else
    cout << "NO";
}
