def get_S(x1, x2, x3, y1, y2, y3):
S = 0. 5*((x1-x3) * (y2 - y3) - (x2-x3) * (y1-y3))
return S
with open("INPUT. TXT") as f:
coords = f. read()
x1, y1, x2, y2, x3, y3 = tuple(map(int, coords. split(",")))
with open("OUTPUT. TXT", "w") as f:
f. write(str(get_S(x1, y1, x2, y2, x3, y3)))