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 ls=[[]]
comb n ls=[x:ys|(x:xs)<-tails ls,ys<-comb(n-1)xs]