#include <bits/stdc++.h>
using namespace std;
constexpr double pi = 3.14159265358979;
constexpr long long INF = 4294967297;
int main() {
  ios::sync_with_stdio(NULL);
  cin.tie(NULL);
  cout.tie(NULL);
  for (int i = 0; i < 8; ++i) {
    string t;
    cin >> t;
    long long w = 0, b = 0;
    for (int i = 0; i < 8; ++i) {
      char a, b;
      a = t[i];
      b = t[(i + 1) % 8];
      if (a == b) return cout << "NO", 0;
    }
  }
  cout << "YES";
  return 0;
}
