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