$/=$";print+(<>+<>-1)%<>-<>?"NO":"YES"