n,m=map(int,input().split())
l=[list(input()) for i in range(n)]
x,y=0,0
p=[(1,0),(0,1),(-1,0),(0,-1)]
pos=[(0,0)]
while True:
    if x==n-1 and y==m-1:
        print('Yes')
        break
    l[x][y]='x'
    for dx,dy in p:
        nx=x+dx
        ny=y+dy
        if 0<=nx<n and 0<=ny<m and l[nx][ny]=='.':
            x=nx
            y=ny
            pos.append((x,y))
            break
    else:
        x,y=pos.pop() 
    if len(pos)==0:
        print('No') 
        break