// Arup Guha
// 12/11/2025
// Solution to 2025 UCF HS Online D2 Problem D: Jetpack

import java.util.*;

public class jetpack {

	public static int r;
	public static int c;
	public static char[][] g;
	
	public static void main(String[] args) {
	
		// Read input.
		Scanner stdin = new Scanner(System.in);
		r = stdin.nextInt();
		c = stdin.nextInt();
		g = new char[r][];
		for (int i=0; i<r; i++)
			g[i] = stdin.next().toCharArray();
			
		// Figure out where to start.
		int startC = findBCol()+1;
		
		// This is a bit tricky!
		boolean good = (startC == c);
		
		// Go column by column.
		for (int j=startC; j<c; j++) {
		
			// Go to each spot on this column.
			for (int i=0; i<r; i++) {
			
				// Can't go here.
				if (g[i][j] == 'z') continue;
				
				// Move from up and left.
				if (i>0 && g[i-1][j-1] == 'b') g[i][j] = 'b';
					
				// From left.
				if (g[i][j-1] == 'b') g[i][j] = 'b';
				
				// Move from down and left.
				if (i<r-1 && g[i+1][j-1] == 'b') g[i][j] = 'b';
				
				// Just check here.
				if (j == c-1 && g[i][j] == 'b') good = true;
			}
		}
		
		// Ta da!
		if (good)
			System.out.println("YES");
		else
			System.out.println("NO");
	}
	
	// Returns b's column.
	public static int findBCol() {
		for (int i=0; i<r; i++)
			for (int j=0; j<c; j++)
				if (g[i][j] == 'b')
					return j;
		
		// should never get here.
		return -1;
	}
}