#include <bits/stdc++.h>
using namespace std;
void solve() {
  string a = "WBWBWBWB", b = "BWBWBWBW";
  vector<string> s(8);
  for (int i = 0; i < 8; i++) {
    cin >> s[i];
  }
  bool c = 0;
  for (int i = 0; i < 7; i++) {
    if (s[0][i] == s[0][i + 1]) c = 1;
  }
  if (c == 1) {
    cout << "NO" << '\n';
    return;
  }
  for (int i = 1; i < 8; i++) {
    bool chered = 0, col = 0;
    for (int j = 0; j < 7; j++) {
      if (s[i][j] == s[i - 1][j]) col = 1;
      if (s[i][j] == s[i][j + 1]) chered = 1;
    }
    if (chered) {
      cout << "NO" << '\n';
      return;
    }
  }
  cout << "YES" << '\n';
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
}
