#include <bits/stdc++.h>
using namespace std;
int main() {
  int count = 0, b = 0, w = 0;
  vector<string> s;
  s.resize(8);
  bool flag = true;
  for (int i = 0; i < 8; i++) {
    cin >> s[i];
  }
  for (int i = 0; i < 8 && flag; i++) {
    for (int r = 0; r < 8; r++) {
      if (s[i].at(r) == 'B')
        b++;
      else
        w++;
      if (r != 7)
        if (s[i].at(r) == s[i].at(r + 1)) {
          cout << "NO";
          flag = false;
          break;
        }
    }
    if (b != 4 && flag) {
      cout << "NO";
      break;
    }
    if (w != 4 && flag) {
      cout << "NO";
      break;
    }
    count++;
    w = 0;
    b = 0;
  }
  if (count == 8 && flag) cout << "YES";
  return 0;
}
