bài 1
from math import sqrt
x1 = int(input())
y1 = int(input())
x2 = int(input())
y2 = int(input())
dAB = sqrt((x2-x1)**2+(y2-y1)**2)
print("{:.2}".format(dAB))
bài 2
from math import sqrt
a = int(input())
b = int(input())
c = int(input())
d = a+b+c
p = d/2
s = sqrt(p*(p-a)*(p-b)*(p-c))
print(d)
print("{:.3}".format(s))
bài 3
from math import sqrt
x1 = int(input())
x2 = int(input())
x3 = int(input())
y1 = int(input())
y2 = int(input())
y3 = int(input())
dAB = sqrt((x2-x1)**2+(y2-y1)**2)
dBC = sqrt((x3-x2)**2+(y3-y2)**2)
dCA = sqrt((x1-x3)**2+(y1-y3)**2)
print("{:.3}".format(dAB))
print("{:.3}".format(dBC))
print("{:.3}".format(dCA))
bài 4
a = int(input())
b = int(input())
x = (a-2)*(b-2)
y = a*b-x
print(x)
print(y)
bài 5
N = int(input())
S = (N*(N+1))/2
print(S)