#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
const double pi = acos(-1.0);
const int maxn = (int)1e5 + 10;
const int mod = (int)1e9;
long long a, b, c, d, i, j, k, l, t, n, m, p, q, r, s;
double e, f, g;
vector<long long> u, v, w;
string x, y, z;
int main() {
  while (cin >> x) {
    a = 0;
    b = 0;
    for (j = 0; j < (7); j++) {
      if (x[j] != x[j + 1]) a++;
    }
    if (a == 7) b++;
    for (i = 0; i < (7); i++) {
      cin >> x;
      a = 0;
      for (j = 0; j < (7); j++) {
        if (x[j] != x[j + 1]) a++;
      }
      if (a == 7) b++;
    }
    if (b == 8)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
