import math
bef = float(input("Egyik befogó: "))
atf = float(input("Átfogó: "))
if bef > 0 and atf > 0 and atf > bef:
bef2 = atf**2 - bef**2
bef2 = math.sqrt(bef2)
print("1. befogó: {}\n2. befogó {:0.4f}\nátfogó {}".format(bef, bef2, atf))
else:
print("Nincs ilyen háromszög!")