main = interact $ unlines . map show . itp1_10_d . map (map read . words) . tail . lines

itp1_10_d [vx,vy] = [md 1, md 2, md 3, mdi]
 where
  md p = (sum (zipWith (\x y -> abs (x-y) ** p) vx vy)) ** (1/p)
  mdi = maximum (map abs (zipWith subtract vx vy))