h,w=map(int,input().split())
d=[['.']*(n+2) for j in range(n+2)]
for i in range(n):
  s,t=map(int,input().split())
  d[s][t]='#'
for k in range(1,n+1):
  for l in range(1,n+1):
    if all(aa=='.' or aa in [d[k-1][l],d[k+1][l],d[k][l-1],d[k][l+1]]):
      print('No')
      exit()
print('Yes')