program bolshe;
type
univ=set of 1..255;
var
a,b:univ;
i,j:integer;
begin
a:=[2,3,4,5,56,78,100,120];
b:=[1,2,5,9,11,15,36,110];
for i:=1 to 255 do
if i in a then
for j:=1 to 255 do
if (j in b) and (i>j) then
writeln('(',i,',',j,')');
end.