import math



def manhattan(xs, ys):

    return sum([abs(x-y) for x, y in zip(xs, ys)])



def euclid(xs, ys):

    return math.sqrt(sum([(x-y)**2 for x, y in zip(xs, ys)]))



def l3(xs, ys):

    return sum([abs(x-y)**3 for x, y in zip(xs, ys)])**(1/3)



def chev(xs, ys):

    return max([abs(x-y) for x, y in zip(xs, ys)])



def norm():

    n = int(eval(input()))

    xs = list(map(int, input().split()))

    ys = list(map(int, input().split()))

    print((manhattan(xs, ys)))

    print((euclid(xs, ys)))

    print((l3(xs, ys)))

    print((chev(xs, ys)))



norm()
import math



n = int(eval(input()))

x = list(map(int, input().split()))

y = list(map(int, input().split()))



print((sum([math.fabs(v[0] - v[1]) for v in zip(x, y)])))

print((sum([math.fabs((v[0] - v[1]) ** 2) for v in zip(x, y)]) ** (1/2)))

print((sum([math.fabs((v[0] - v[1]) ** 3) for v in zip(x, y)]) ** (1/3)))

print((max([math.fabs(v[0] - v[1]) for v in zip(x, y)])))



import math


def manhattan(xs, ys):
    return sum([abs(x - y) for x, y in zip(xs, ys)])


def euclid(xs, ys):
    return math.sqrt(sum([(x - y) ** 2 for x, y in zip(xs, ys)]))


def l3(xs, ys):
    return sum([abs(x - y) ** 3 for x, y in zip(xs, ys)]) ** (1 / 3)


def chev(xs, ys):
    return max([abs(x - y) for x, y in zip(xs, ys)])


def norm():
    n = int(eval(input()))
    xs = list(map(int, input().split()))
    ys = list(map(int, input().split()))
    print((manhattan(xs, ys)))
    print((euclid(xs, ys)))
    print((l3(xs, ys)))
    print((chev(xs, ys)))


norm()

import math

n = int(eval(input()))
x = list(map(int, input().split()))
y = list(map(int, input().split()))
print((sum([math.fabs(v[0] - v[1]) for v in zip(x, y)])))
print((sum([math.fabs((v[0] - v[1]) ** 2) for v in zip(x, y)]) ** (1 / 2)))
print((sum([math.fabs((v[0] - v[1]) ** 3) for v in zip(x, y)]) ** (1 / 3)))
print((max([math.fabs(v[0] - v[1]) for v in zip(x, y)])))

- -def manhattan(xs, ys): -    return sum([abs(x - y) for x, y in zip(xs, ys)]) - - -def euclid(xs, ys): -    return math.sqrt(sum([(x - y) ** 2 for x, y in zip(xs, ys)])) - - -def l3(xs, ys): -    return sum([abs(x - y) ** 3 for x, y in zip(xs, ys)]) ** (1 / 3) - - -def chev(xs, ys): -    return max([abs(x - y) for x, y in zip(xs, ys)]) - - -def norm(): -    n = int(eval(input())) -    xs = list(map(int, input().split())) -    ys = list(map(int, input().split())) -    print((manhattan(xs, ys))) -    print((euclid(xs, ys))) -    print((l3(xs, ys))) -    print((chev(xs, ys))) - - -norm() +n = int(eval(input())) +x = list(map(int, input().split())) +y = list(map(int, input().split())) +print((sum([math.fabs(v[0] - v[1]) for v in zip(x, y)]))) +print((sum([math.fabs((v[0] - v[1]) ** 2) for v in zip(x, y)]) ** (1 / 2))) +print((sum([math.fabs((v[0] - v[1]) ** 3) for v in zip(x, y)]) ** (1 / 3))) +print((max([math.fabs(v[0] - v[1]) for v in zip(x, y)])))