Var a, b, S, M, Z:integer;
begin
write('a = '); read(a);
write('b = '); read(b);
S:=a+b; M:=a-b; Z:=a*b;
if ((a mod 2)<>0) and ((b mod 2)<>0) then write('M = ',M)
else if ((a mod 2)=0) and ((b mod 2)=0) then write('S = ',S);
if ((a mod 2)<>0) and ((b mod 2)=0) then write('Z = ',Z)
else if ((a mod 2)=0) and ((b mod 2)<>0) then write('Z = ',Z);
end.