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