local x1, y1, x2, y2, x3, y3 = io.read("*n", "*n", "*n", "*n", "*n", "*n") local x4, y4 = nil, nil if((y2 - y1) * (y3 - y1) == -(x2 - x1) * (x3 - x1)) then if(math.abs(y2 - y1) == math.abs(x3 - x1) and math.abs(x2 - x1) == math.abs(y3 - y1)) then x4, y4 = x2 + x3 - x1, y2 + y3 - y1 end elseif((y1 - y2) * (y3 - y2) == -(x1 - x2) * (x3 - x2)) then if(math.abs(y1 - y2) == math.abs(x3 - x2) and math.abs(x1 - x2) == math.abs(y3 - y2)) then x4, y4 = x1 + x3 - x2, y1 + y3 - y2 end elseif((y1 - y3) * (y2 - y3) == -(x1 - x3) * (x2 - x3)) then if(math.abs(y1 - y3) == math.abs(x2 - x3) and math.abs(x1 - x3) == math.abs(y2 - y3)) then x4, y4 = x1 + x2 - x3, y1 + y2 - y3 end else candraw = false end print(x4 ~= nil and string.format("%d %d\n", x4, y4) or "-1")