Uses Crt;
const n=3;
type Vec=array [1..n] of integer;
var X, Y:Vec;
P1, P2, S :longint;
i: integer;
begin
ClrScr;
P1:=1; P2:=1;
for i:=1 to n do
begin
Write (' X[', i, ']='); ReadLn (X[i]);
P1:=P1*X[i];
end;
WriteLn(' P1 = ', P1);
WriteLn;
for i:=1 to n do
begin
Write (' Y[', i, ']='); ReadLn (Y[i]);
P2:=P2*Y[i];
end;
Writeln(' P2 =', P2);
WriteLn;
S:=P1+P2;
Writeln (' S = P1 + P2 =', S:4);
ReadLn;
end.