#include <bits/stdc++.h>
using namespace std;
bool btest = 0;
const int maxn = 1001;
const int INF = (int)1e9;
int n, m;
int main() {
  ios::sync_with_stdio(0);
  int i, j, k;
  int b = true;
  string s;
  for (i = 1; i <= 8; i++) {
    cin >> s;
    for (j = 0; j < 7; j++) {
      if (s[j] == s[j + 1]) {
        cout << "NO" << endl;
        return 0;
      }
    }
  }
  cout << "YES" << endl;
  return 0;
}
