#include <bits/stdc++.h>
using namespace std;
long long MOD = pow(10, 9) + 7;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int test = 1;
  while (test--) {
    int rows = 8;
    int out = 0;
    while (rows--) {
      string row;
      cin >> row;
      int flag = 0;
      char prev = row[0];
      for (int i = 1; i < 8; i++) {
        char pres = row[i];
        if (!flag) {
          if (pres == prev) {
            flag = 1;
          }
        } else {
          if (pres == prev) {
            out = 1;
            cout << "NO" << endl;
            break;
          }
        }
        prev = pres;
      }
      if (out) break;
      if (flag == 1 && row[0] == row[7]) {
        out = 1;
        cout << "NO" << endl;
        break;
      }
    }
    if (!out) cout << "YES" << endl;
  }
}
