a, b, c, d, e = io.read("*n", "*n", "*n", "*n", "*n") print(b == d and "Yes" or "No")