#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long i, j, f = 0;
  char x, y;
  vector<string> v(8, "");
  for (i = 0; i < 8; i++) {
    cin >> v[i];
  }
  for (i = 0; i < 8; i++) {
    x = v[i][0];
    y = (x == 'B' ? 'W' : 'B');
    for (j = 0; j < 8; j++) {
      if (j % 2 == 0 && v[i][j] != x) {
        f = 1;
        break;
      }
      if (j % 2 != 0 && v[i][j] != y) {
        f = 1;
        break;
      }
    }
  }
  if (f)
    cout << "NO\n";
  else
    cout << "YES\n";
  return 0;
}
