#P2026. 求一次函数解析式

求一次函数解析式

Description

Given the coordinates of two lattice points, find the function expression of the line they determine (a linear function).

Input Format

The first line contains two integers x1,y1x_1, y_1, indicating that the coordinates of the first lattice point are (x1,y1)(x_1, y_1).

The second line contains two integers x2,y2x_2, y_2, indicating that the coordinates of the second lattice point are (x2,y2)(x_2, y_2).

Output Format

Output a single line, which is the function expression.

3 6
2 4

y=2x


3 5
2 7
y=-2x+11
3 -1
5 -2
y=-1/2*x+1/2

Hint

2x2 x is written as 2x.

12x\frac{1}{2}x is written as 1/2*x.

Translated by ChatGPT 5