a=!randint 3,6
premier=!exec pari primes(2*$a)

premier=!item $a to $a+5 of $premier
NN=1,$premier
!for i=1 to 5
l=!randint 2,3
u= !shuffle 1,$premier
u=!item 1 to $l  of $u
v=!product x for x in $u
NN=!append item $v to $NN
!next i

NN=!listuniq $NN
nn=!itemcnt $NN
NN =!shuffle $NN
NN=!item 1 to $n of $NN
n=!itemcnt $NN
!distribute item $NN into N1,N2,N3,N4,N5,N6,N7,N8,N9,N10,N11,N12,N13,N14,N15,N16,N17,N18,N19

G=!exec pari {NN=[$NN];print(matrix($n,$n,i,j, if(i<>j&&divrem(NN[j],NN[i])[2]==0,1,0)))}

G=!trim $G
GM=!translate internal ; to $\
$ in $G
etp=0
GC=!exec pari M=matrix($n,$n,i,j,0);print(M)
D=$G
GCM=!translate internal ; to $\
$ in $GC
DM=!translate internal ; to $\
$ in $D
