#include <bits/stdc++.h>
using namespace std;
int main() {
  bool flag = true;
  for (int i = 0; i < 8; ++i) {
    string s;
    cin >> s;
    char c = s[0];
    for (int i = 1; i < s.length(); ++i) {
      if (c == s[i])
        flag = false;
      else
        c = s[i];
    }
  }
  if (flag)
    cout << "YES";
  else
    cout << "NO";
}
