#include <bits/stdc++.h>
using namespace std;
void toh(int n, char from, char to, char aux) {
  if (n == 1) {
    cout << 1 << " " << from << " -> " << to << endl;
    return;
  }
  toh(n - 1, from, aux, to);
  cout << n << " " << from << " -> " << to << endl;
  toh(n - 1, aux, to, from);
}
int main() {
  long long int n, i, j, k;
  string s, temp = "", ans = "";
  vector<string> v(8);
  for (i = 0; i < 8; i++) cin >> v[i];
  bool flag = true;
  for (i = 0; i < 8; i++) {
    for (j = 0; j < v[i].length() - 1; j++)
      if (v[i][j] == v[i][j + 1]) {
        flag = false;
        break;
      }
  }
  if (flag)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
