#include <bits/stdc++.h>
using namespace std;
int main() {
  char b, c;
  long long int i, j, a, f = 1;
  for (i = 0; f == 1 && i < 8; ++i) {
    a = 0;
    cin >> b;
    for (j = 0; j < 7; ++j) {
      cin >> c;
      if (c == b) {
        f = 0;
        break;
      }
      b = c;
    }
  }
  if (f)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
