#include <bits/stdc++.h>
using namespace std;
char board[10][10];
bool judge(int d) {
  int j;
  for (j = 0; j < 8; j++) {
    if (board[d][j] == board[d + 1][j]) return false;
  }
  return true;
}
int main() {
  int i, j;
  for (i = 0; i < 8; i++) {
    scanf("%s", &board[i]);
  }
  int temp = 0;
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 7; j++) {
      if (board[i][j] == board[i][j + 1] || board[i][0] == board[i][7]) {
        temp = 1;
        break;
      }
    }
    if (temp == 1) break;
  }
  if (temp == 1) {
    cout << "NO" << endl;
    return 0;
  } else {
    for (i = 0; i < 7; i++) {
      for (j = 0; j < 8; j++) {
        if (board[i][j] == board[i + 1][j]) {
          char s = board[i + 1][0];
          for (int k = 0; k < 7; k++) {
            board[i + 1][k] = board[i + 1][k + 1];
          }
          board[i + 1][7] = s;
          bool flag = judge(i);
          if (flag)
            continue;
          else {
            cout << "NO" << endl;
            return 0;
          }
        }
      }
    }
    cout << "YES" << endl;
  }
  return 0;
}
