/*Name : Adrian Stefan Mares

School : Cygnus Computer

Grade : 7

Junior 5 Division Contest #1

Language : C++

*/

 

#include<cstdio>

using namespace std;

 

int whorl [] = { 0,16,16,8,8,4,4,2,2,1,1 };

 

int main()

{

                freopen("prints.in","r",stdin);

                freopen("prints.out","w",stdout);

                int tmp,a,b,i;

                char tmp2;

                for(i=1;i<=5;++i)

                {

                                a=b=1;

                                scanf("%d%c ",&tmp,&tmp2);

                                while(tmp!=0)

                                {

                                                if(tmp%2==0) a+=whorl[tmp];

                                                else b+=whorl[tmp];

                                                scanf("%d%c ",&tmp,&tmp2);

                                }

                                printf("%d/%d\n",a,b);

                }

                return 0;

}