H,W=map(int,input().split()) S=[input() for i in range(H)] cnt0=[[0]*(H+W) for i in range(H)] cnt1=[[0]*(H+W) for i in range(H)] for i in range(H): for j in range(W): if S[i][j]=='#': cnt0[i][i-j]+=1 cnt1[i][i+j]+=1 for i in range(1,H): for j in range(H+W): cnt0[i][j]+=cnt0[i-1][j] cnt1[i][j]+=cnt1[i-1][j] result0=[[0]*(H+W) for i in range(H)] result1=[[0]*(H+W) for i in range(H)] p=[[0]*W for i in range(H)] for i in range(1,H-1): for j in range(1,W-1): if S[i][j]=='.': continue l=0 r=min(i,H-1-i,j,W-1-j) while True: m=(l+r+1)//2 k1=cnt0[i+m][i-j] k2=cnt1[i+m][i+j] if i-m>0: k1-=cnt0[i-m-1][i-j] k2-=cnt1[i-m-1][i+j] if k1+k2==2*(2*m+1): l=m else: r=m-1 if l==r: break if l>0: result0[i-l][i-j]+=1 result1[i-l][i+j]+=1 p[i][j]+=1 if i+m+10: p=[0] print(p[1]) p=[0] print('Yes')