#include <bits/stdc++.h>
using namespace std;
int main() {
  string x;
  deque<char> vec;
  int c;
  bool flag;
  int max = 0;
  for (int i = 0; i < 8; i++) {
    cin >> x;
    for (int j = 0; j < x.length(); j++) vec.push_back(x[j]);
    if (i % 2 == 0) {
      c = 0;
      while (true) {
        c++;
        flag = true;
        for (int j = 1; j < x.length(); j++) {
          if (x[j] == x[j - 1]) {
            flag = false;
            char temp = vec.back();
            vec.pop_back();
            vec.push_front(temp);
            break;
          }
        }
        if (c == 9 || flag == true) break;
      }
    } else if (i % 2 != 0) {
      c = 0;
      while (true) {
        c++;
        flag = true;
        for (int j = 1; j < x.length(); j++) {
          if (x[j] == x[j - 1]) {
            flag = false;
            char temp = vec.back();
            vec.pop_back();
            vec.push_front(temp);
            break;
          }
        }
        if (c == 9 || flag == true) break;
      }
    }
    if (c > max) max = c;
  }
  if (flag == false || max == 9)
    cout << "NO";
  else
    cout << "YES";
  return 0;
}
