#include <bits/stdc++.h>
using namespace std;
double fast_pow(double a, long long n) {
  if (n == 0) return 1;
  if (n % 2 == 0) return fast_pow(a * a, n / 2);
  return a * fast_pow(a, n - 1);
}
const int inf = 1e9 + 7;
void dijkstra(int start, int n, vector<vector<tuple<int, int, int>>> &g,
              vector<int> &dist, vector<int> &prev) {
  dist[start] = 0;
  vector<bool> used(n + 1, false);
  int u = start;
  while (u != 0) {
    used[u] = true;
    for (auto edge : g[u]) {
      int v = get<0>(edge), s = get<1>(edge), c = get<2>(edge);
      if (c < dist[v] && dist[u] <= s) {
        dist[v] = c;
        prev[v] = u;
      }
    }
    u = 0;
    int min_dist = inf;
    for (int i = 1; i <= n; i++) {
      if (!used[i] && dist[i] < min_dist) {
        u = i;
        min_dist = dist[i];
      }
    }
  }
}
void floid(int n, vector<vector<int>> &f) {
  for (int k = 0; k < n; k++)
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++) f[i][j] = min(f[i][j], f[i][k] + f[k][j]);
}
void ford_bellman(int n, int m) {
  vector<vector<int>> edges(m, vector<int>(3));
  vector<int> dist(n + 1, inf);
  dist[1] = 0;
  for (int i = 0; i < m; i++) cin >> edges[i][0] >> edges[i][1] >> edges[i][2];
  for (int k = 0; k < n; k++) {
    for (auto edge : edges) {
      int u = edge[0];
      int v = edge[1];
      int w = edge[2];
      if (dist[u] < inf)
        if (dist[u] + w < dist[v] && u != v) dist[v] = dist[u] + w;
    }
  }
}
void dfs(int start, vector<int> &colors, vector<vector<int>> &g) {
  if (colors[start] == 0) colors[start] = 2;
  for (auto u : g[start]) {
    if (colors[u] == 0) {
      colors[u] = 3 - colors[start];
      dfs(u, colors, g);
    }
  }
}
void BFS(const vector<vector<int>> &g, const int &n, const int &x) {
  queue<int> q;
  vector<int> dist(n + 1, -1);
  dist[x] = 0;
  q.push(x);
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (auto v : g[u]) {
      if (v == -1) {
        dist[v] = dist[u] + 1;
        q.push(v);
      }
    }
  }
}
int const BASE = 31;
int const M = 1e9 + 7;
void calc_hash(string &s, vector<int> &prefix) {
  int n = s.size();
  prefix[0] = 0;
  for (int i = 0; i < n; i++)
    prefix[i + 1] = ((long long)prefix[i] * BASE + s[i] - 'a' + 1) % M;
}
void calc_power(int n, vector<int> &power) {
  power[0] = 1;
  for (int i = 0; i < n; i++) power[i + 1] = (long long)power[i] * BASE % M;
}
int get_hash(int i, int j, vector<int> &prefix, vector<int> &power) {
  return (prefix[j] - (long long)prefix[i - 1] * power[j - i + 1] % M + M) % M;
}
int main() {
  char c, b;
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      cin >> c;
      if (j == 0) {
        b = c;
        continue;
      }
      if (c == b) {
        cout << "NO";
        return 0;
      } else {
        b = c;
      }
    }
  }
  cout << "YES";
  return 0;
}
