s=input() t=input() u=input() v=s+t+u for i in range(8): if v[i]+v[i+1] not in '.#.': print('No') exit() print('Yes')