#include <bits/stdc++.h>
using namespace std;
int main() {
  char ar[9][9];
  long long i;
  for (i = 0; i < 8; i++) cin >> ar[i];
  for (i = 0; i < 8; i++) {
    for (long long j = 1; j < 8; j++) {
      if (ar[i][j] == ar[i][j - 1]) {
        cout << "NO";
        return 0;
      }
    }
  }
  cout << "YES";
  return 0;
}
