#include <bits/stdc++.h>
using namespace std;
long long big_mod(long long a, long long p, long long m) {
  long long res = 1, x = a;
  while (p) {
    if (p & 1) res = (res * x) % m;
    x = (x * x) % m;
    p >>= 1;
  }
  return res;
}
int main() {
  string str[10];
  char ch, temp;
  string a = "WBWBWBWB";
  string b = "BWBWBWBW";
  for (int i = 0; i < 8; ++i) cin >> str[i];
  for (int i = 0; i < 8; ++i) {
    bool flag = false;
    if (i & 1) {
      for (int j = 0; j < 8; ++j) {
        if (str[i] == b) {
          flag = true;
          break;
        }
        ch = str[i][7];
        temp = str[i][0];
        for (int k = 1; k < 8; ++k) swap(str[i][k], temp);
        str[i][0] = ch;
      }
    } else {
      for (int j = 0; j < 8; ++j) {
        if (str[i] == a) {
          flag = true;
          break;
        }
        ch = str[i][7];
        temp = str[i][0];
        for (int k = 1; k < 8; ++k) swap(str[i][k], temp);
        str[i][0] = ch;
      }
    }
    if (!flag) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
