$K=<>; $N=32; $M=465; $M+=$K>>$_&1for 0..$N; print"$N $M\n"; for$i(1..$N-2){ for$j($i+1..$N-1){ print"$i $j\n" } } for(2..$N-1){ if($K>>$_-2&1){ print"$_ $N\n" } }