def on_one_line(x1, y1, x2, y2, x3, y3):
if (x1 == x2 and y1 == y2) or (x1 == x3 and y1 == y3) or (x2 == x3 and y2 == y3):
return True
slope = (y2 - y1) / (x2 - x1) if x2 != x1 else float('inf')
return (y3 - y1) / (x3 - x1) == slope if x3 != x1 else y3 == y1
x1, y1 = 1, 1
x2, y2 = 2, 2
x3, y3 = 3, 4
if on_one_line(x1, y1, x2, y2, x3, y3):
print("Точки лежат на одной прямой")
else:
print("Точки не лежат на одной прямой")