#include #include #include #include #include #include #include #include #include #include #include #define inf 1000000000 #define pa pair #define ll long long using namespace std; int read() { int x=0,f=1;char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();} while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();} return x*f; } int gcd(int a,int b) { return b==0?a:gcd(b,a%b); } int n,m,tot,ans; int a[30]; int a1[15][15],a2[15][15]; void dfs(int x,int y,int now) { if(x==n&&y==m) { tot++; ans+=now; return; } if(x+1<=n) { a[x+y+1]=1; if(a[x+y]==0&&x+y!=0)dfs(x+1,y,now+1); else dfs(x+1,y,now); } if(y+1<=m)a[x+y+1]=0,dfs(x,y+1,now); } int main() { memset(a1,-1,sizeof(a1)); while(scanf("%d%d",&n,&m)!=EOF) { if(a1[n][m]==-1) { ans=tot=0; dfs(0,0,0); int t=gcd(tot,ans); a1[n][m]=ans/t; a2[n][m]=tot/t; } printf("%d/%d\n",a1[n][m],a2[n][m]); } return 0; }