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