import java.util.*;
import java.io.*;
import java.math.*;
public class Main
{
public static void main(String args[])
{
Scanner in = new Scanner(System.in);
BigInteger N,D,x,y,four,n18,one,gg;
while(in.hasNext()){
int n, d;
n = in.nextInt();
d = in.nextInt();
if(n == 1 && d == 1){
System.out.println(0);
continue;
}
N = BigInteger.valueOf(n);
D = BigInteger.valueOf(d);
four = BigInteger.valueOf(4);
n18 = BigInteger.valueOf(18);
one = BigInteger.valueOf(1);
x = (N.add(four)).multiply(N.add(four)).multiply(D).multiply(D.add(one.negate()));
y = n18.multiply(N.pow(d));
if(x.equals(y))System.out.println("1");
else{
gg = x.gcd(y);
System.out.print(x.divide(gg));
System.out.print("/");
System.out.println(y.divide(gg));
}
}
}
}