l=[] for i in range(3): s=list(input()) l.append(s) if l[0]==["#",".","#"] and l[1]==[".","#","."] and l[2]==["#",".","#"]: print("Yes") exit() elif l[0]==[".","#","."] and l[1]==["#",".","#"] and l[2]==[".","#","."]: print("Yes") exit() print("No")