using namespace std;
int main()
{
int temp1;
int temp2;
cin>>temp1>>temp2;
int a=temp1;
int b=temp2;
while(b!=0)
{
int temp=a%b;
a=b;
b=temp;
}
cout<<temp1/a<<"/"<<temp2/a;
return 0;
}