#include<iostream>
using namespace std;
int main(){
long int a,b,c;
cin>>a>>b;
while(1){
if(b%a){
c=b/a+1;
}
else{
c=b/a;
a=1;
}
if(a==1){
cout<<"1/"<<c;
break;
}
else{
cout<<"1/"<<c<<"+";
}
a=a*c-b;
b=b*c;
if(a==3&&b%2==0){
cout<<"1/"<<c/2<<"+1/"<<c;
break;
}
}
}
using namespace std;
int main(){
long int a,b,c;
cin>>a>>b;
while(1){
if(b%a){
c=b/a+1;
}
else{
c=b/a;
a=1;
}
if(a==1){
cout<<"1/"<<c;
break;
}
else{
cout<<"1/"<<c<<"+";
}
a=a*c-b;
b=b*c;
if(a==3&&b%2==0){
cout<<"1/"<<c/2<<"+1/"<<c;
break;
}
}
}