#include <bits/stdc++.h>
using namespace std;
bool cek(string text) {
  char prev = '\0';
  bool valid = true;
  for (int i = 0; i < 8; i++) {
    if (text[i] == prev && i != 0) {
      valid = false;
      break;
    } else {
      prev = text[i];
    }
  }
  return valid;
}
int main() {
  string x;
  bool valid = true;
  int i = 8;
  while (i--) {
    cin >> x;
    if (valid) {
      valid = cek(x);
    }
  }
  if (valid) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
}
