import qualified Data.ByteString.Char8 as B
import Data.Maybe
import Data.List
import Data.List.Split
main = print.solve.map(fst.fromJust.B.readInt).B.words=<<B.getContents
solve(_:xs)= maximum.map(minimum.map(\x->abs(head x-last x)).transpose).comb 2.chunksOf 2$xs
comb 0 xs=[[]]
comb k xs
 |length xs<k=[]
 |otherwise=comb k t++map(h:)(comb(k-1)t)
 where(h:t)=xs