include<iostream>
#include<cstdio>
#include<algorithm>
#include<string.h>
using namespace std;;
int main()
{
freopen("last_SYF.in","r",stdin);
freopen("last_SYF.out","w",stdout); int n,m;cin>>n>>m; int c=__gcd(n,m);cout<<n/c<<"/"<<m/c; return 0;
}