#include <bits/stdc++.h>
using namespace std;
int n, m, p, s, q, t, i, j, k, x, y, z, c, d, l, r, l1, l2, lst, a, b, mn, mx,
    cnt, res, ans, cur, u, v;
string str;
int main() {
  for (i = 0; i < 8; i++) {
    cin >> str;
    for (j = 0; j < 7; j++) {
      if (str[j] == str[j + 1]) {
        cout << "NO";
        return 0;
      }
    }
  }
  cout << "YES";
}
