Информатика, паскаль...
Var xe, ye, xf, yf: integer; begin readln(xe, ye); readln(xf, yf); if abs(xe - xf) = abs(ye - yf) then writeln('YES') else writeln('NO') end.