#include <bits/stdc++.h>
using namespace std;
int INF = 2147483647;
int inf = -2147483648;
const double PI = acos(-1.0);
const double pi = 2 * asin(1.0);
int main() {
  ios::sync_with_stdio(false);
  int flag;
  char s[10];
  flag = false;
  for (int i = 0; i < 8; i++) {
    cin >> s;
    s[8] = s[0];
    for (int j = 0; j <= 7; j++) {
      if (s[j] == s[j + 1]) {
        flag = true;
        break;
      }
    }
  }
  if (flag == true) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
  }
  return 0;
}
