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