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