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