#include <bits/stdc++.h>
using namespace std;
string s[9];
int t, m, oq, qora;
int main() {
  for (t = 1; t <= 8; t++) cin >> s[t];
  for (t = 1; t <= 8; t++)
    for (m = 0; m <= 7; m++)
      if (s[t][m] == s[t][m + 1]) return cout << "NO", 0;
  cout << "YES";
  return 0;
}
