H,W=map(int,input().split()) S=[input() for h in range(H)] ans="NO" cnt=0 for h in range(H): for w in range(W): if S[h][w]==".": cnt+=1 for _ in range(4): for h in range(H-1): for w in range(W-1): lh,rw=h,w+1 while lh and S[lh-1][w]==".": lh-=1 while rw=2 and rw-lw>=2: ans="YES" S=[[S[h][W-1-w] for h in range(H)] for w in range(W)] H,W=W,H print(ans)