import java.awt.geom.Point2D;
import java.util.Scanner;
class Line
{
double Slope,Offset;
Line(double a, double b)
{
Slope = a;
Offset = b;
}
Line(double a, Point2D.Double p)
{
Slope = a;
Offset = CalculateOffset(p);
}
public String toString()
{
return ("y=" + Slope + "*x+" + Offset);
}
Point2D.Double GetPointOnLine(double x)
{
return new Point2D.Double(x, Slope*x+Offset);
}
double CalculateOffset(Point2D.Double p)
{
return p.getY()-Slope*p.getX();
}
public Line GetIntersectingLine(Point2D.Double p)