#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  bool f = true;
  for (int i = 0; i < 8; i++) {
    cin >> s;
    for (int i = 0; i < 7; i++)
      if (s[i] == s[i + 1]) {
        f = false;
        break;
      }
  }
  if (f)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
