INTEGER A,B,C,D
READ*,A,B,C,D
WRITE(*,FMT="(I0)",advance='no') C+B-D
WRITE(*,FMT="(A)",advance='no') " "
WRITE(*,FMT="(I0)",advance='no') D-A+C
WRITE(*,FMT="(A)",advance='no') " "
WRITE(*,FMT="(I0)",advance='no') A+B-D
WRITE(*,FMT="(A)",advance='no') " "
WRITE(*,FMT="(I0)",advance='no') B-A+C
END