#include <bits/stdc++.h>
using namespace std;
char s[9];
int main() {
  bool flag = true;
  for (int i = 0; i < 8; i++) {
    cin >> s;
    if (flag) {
      for (int j = 0; j < 7; j++) {
        if (s[j] == s[j + 1]) {
          flag = false;
          break;
        }
      }
    }
  }
  cout << (flag ? "YES" : "NO") << endl;
  return 0;
}
