#include <iostream.h>
void main(void)
{
struct Line
{
int a,b;
};
Line line1,line2;
cout<<"input a,b of line1 and line"<<endl;
cin>>line1.a>>line1.b;
cin>>line2.a>>line2.b;
int x,y;
x=(line2.b-line1.b)/(line1.a-line2.a);
y=line1.a*x+line1.b;
cout<<"The cross of line1 and line2 is "<<"("<<x<<","<<y<<")"<<endl;
}