$n=<>; print $n%2?1:2,$",($n-1)>>1,$/; while(<>>1){ ($k,$x)=glob<>; print $k,$",$n-$k+2-$x,$/; }