#include <bits/stdc++.h>
using namespace std;
bool sortbysec(const pair<string, int> &a, const pair<string, int> &b) {
  if (a.second != b.second)
    return (a.second > b.second);
  else
    return (a.first < b.first);
}
bool sortinrev3(const pair<int, pair<int, int> > &a,
                const pair<int, pair<int, int> > &b) {
  return (a.first > b.first);
}
bool sortinrev(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.first > b.first);
}
bool isPrime(long long num) {
  bool flag = true;
  for (long long i = 2; i <= sqrt(num); i++) {
    if (num % i == 0) {
      flag = false;
      break;
    }
  }
  return flag;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  bool fail(false);
  string s;
  for (int i = 0; i < 8; ++i) {
    cin >> s;
    for (size_t j = 1; j < s.length(); ++j) {
      if (s[j] == s[j - 1]) {
        fail = true;
      }
    }
  }
  cout << (fail ? "NO" : "YES") << endl;
  return 0;
}
