print "Interseccion entre dos rectas"
x1 = float(raw_input("x1: "))
y1 = float(raw_input("y1: "))
x2 = float(raw_input("x2: "))
y2 = float(raw_input("y2: "))
x3 = float(raw_input("x3: "))
y3 = float(raw_input("y3: "))
x4 = float(raw_input("x4: "))
y4 = float(raw_input("y4: "))
Dxa = x2-x1
Dya = y2-y1
ma = Dya/Dxa
ba = -ma*x1+y1
Dxb = x4-x3
Dyb = y4-y3
mb = Dyb/Dxb
bb = -mb*x3+y3
xi = (bb - ba)/(ma-mb)
yi = ma*xi + ba
print "interseccion (",xi, ", " ,yi, ")"