S = [] for _ in range(3): tmp = list(map(lambda x:x == '#',list(input()))) S.append(tmp) for h in range(3): for w in range(3): if (h+w) % 2 == 0: if S[h][w] == S[0][0]: pass else: print('No') exit() else: if S[h][w] != S[0][0]: pass else: print('No') exit() print('Yes')