6 6
 1 4
 4 4
 3 3
 6 4
 6 3
 5 4
 5 6
 3 4
 1 3
 3 2
 5 5
 1 1
 2 1
 3 1
 3 5
 1 6
 6 5
 2 3
 4 3
 2 2
 3 6
 1 2
 6 1
 2 5
 4 5
 1 5
 6 2
 4 6
 5 1
 4 1
 5 2
 2 4
 2 6
 5 3

1/6
 1/2
 1/2
 2/3
 1/6
 1/6
 1/3
 1/6
 1/2
 2/3
 2/3
 1/3
 1/1
 5/6
 2/3
 1/3
 1/6
 1/6
 2/3
 1/2
 5/6
 1/6
 5/6
 1/6
 1/3
 1/3
 1/3
 1/6
 1/6
 1/3
 1/2
 1/3
 1/2
 1/6
 1/3

import java.io.*;
import java.util.*;

public class Solution {

    public static void main(String[] args) {
       Scanner scan = new Scanner (System.in);
     int a=scan.nextInt();
     int aa[]=new int[a+1];
     int b=scan.nextInt();    
      int bb[]=new int[b+1];
      int c=0;
    for(int i=1;i<a+1;i++){
       if(a%i==0){aa[i]=i;}
    }
      for(int i=1;i<b+2;i++){
       if(b%i==0){bb[i]=i;}
    }
    Arrays.sort(aa);
        Arrays.sort(bb);
     for(int i=a;i>=1;i--){
         for(int j=b;j>=1;j--){
             if(aa[i]!=0&&bb[j]!=0&&aa[i]==bb[j]){c=bb[j];break;}
         }
         if(c!=0)break;
     }
     
       if(a==b){ System.out.println("1/1"); }
          
         
     System.out.println((b/c)+"/"+(a/c)); 
}}
