type natur=1..maxint;
frac=record
p,q:natur;
end;
procedure AB(a,b:frac;var c:frac);
begin
c.p:=a.p*b.p;
c.q:=a.q*b.q;
end;
type natur=1..maxint;
frac=record
p,q:natur;
end;
procedure AB(a,b:frac;var c:frac);
begin
c.p:=a.p*b.p;
c.q:=a.q*b.q;
end;