#include <bits/stdc++.h>
using namespace std;
int a1,b1,a2,b2;
inline int gcd(int x,int y)
{
while(x!=y)
{
if(x>y) x=x-y;
else y=y-x;
}
return x;
}
int main()
{
while(cin>>a1>>b1>>a2>>b2)
{
if(a1==a2||b1==b2)
{
cout<<"Error"<<endl;
continue;
}
int k1=b2-b1,k2=a2-a1;
int c1=b1*a2-a1*b2,c2=a2-a1;
int fk=0,fc=0;
if(k1*k2<0)
fk=1;
if(c1*c2<0)
fc=1;
k1=abs(k1),k2=abs(k2);
c1=abs(c1),c2=abs(c2);
int gk=gcd(k1,k2);
int gc=gcd(c1,c2);
k1/=gk,k2/=gk;
c1/=gc,c2/=gc;
cout<<"y=";
if(fk) cout<<"-";
if((k1==1&&k2!=1)||(k1!=1)) cout<<k1;
if(k2!=1) cout<<"/"<<k2;
cout<<"x";
if(c1==0) cout<<endl;
else
{
if(fc) cout<<"-";
else cout<<"+";
cout<<c1;
if(c2!=1) cout<<"/"<<c2;
cout<<endl;
}
}
}