#include <bits/stdc++.h>
using namespace std;
int main() {
  bool ok;
  ok = true;
  string s;
  for (int i = 0; i < 8; ++i) {
    cin >> s;
    for (int j = 1; j < 8; ++j) {
      if (s[j] == s[j - 1]) ok = false;
    }
  }
  if (!ok)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}
