package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	var n, m int
	fmt.Scan(&n, &m)
	bufSize := 2 * 1024 * 1024
	buf := make([]byte, bufSize)
	sc := bufio.NewScanner(os.Stdin)
	sc.Buffer(buf, bufSize)
	sli := make([]string, 0, n)
	for sc.Scan() {
		sli = append(sli, sc.Text())
	}
	addX := [4]int{0, 0, 1, -1}
	addY := [4]int{1, -1, 0, 0}
	visited := make([][]bool, n)
	for k, _ := range visited {
		visited[k] = make([]bool, m)
	}
    visited[0][0] = true
	type point struct {
		x, y int
	}
	step := make([]point, 0, n)
	step = append(step, point{0, 0})
	isReach := false
	for len(step) > 0 {
		p := step[0]
		step = step[1:]
		if p.x == n-1 && p.y == m-1 {
			isReach = true
			break
		}
        
		for i := 0; i < 4; i++ {
			nx := p.x + addX[i]
			ny := p.y + addY[i]
			if nx >= 0 && nx < n && ny >= 0 && ny < m && string(sli[nx][ny]) == "." && !visited[nx][ny] {
				step = append(step, point{nx, ny})
                visited[nx][ny] = true
			}
		}
	}
    if isReach{
        fmt.Print("Yes")
    }else{
        fmt.Print("No")
    }
}