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