#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  string r;
  bool correct = true;
  for (int i = 0; i < 8; ++i) {
    cin >> r;
    char prev = r[0];
    for (int j = 1; j < 8; ++j) {
      if (r[j] == prev) correct = false;
      prev = r[j];
    }
  }
  if (correct)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return EXIT_SUCCESS;
}
