/*

Rohan Banerjee

Thomas Jefferson High School for Science and Technology

Junior Division

Contest #1 2010-2011

ACSL Prints

 */

import java.util.*;

public class ACSLPrints_Banerjee

{

                public static final int[] WHORLS = {0, 16, 16, 8, 8, 4, 4, 2, 2, 1, 1};

                public static void main(String[] args)

                {

                                System.out.println("Note: Input consists of the numbers separated by ', '");

                                System.out.println("(e.g '1, 2, 3, 4, 0')\n");

                                Scanner in = new Scanner(System.in);

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

                                {

                                                System.out.print("Input " + i + ": ");

                                                System.out.println("Output " + i + ": " + compute(in.nextLine()));

                                }

                }

                public static String compute(String s)

                {

                                String[] temp = s.split(",");

                                int[] array = new int[temp.length-1];                      //the array of integers to be evaluated

                                for(int i = 0; i < array.length; i++)

                                                array[i] = Integer.parseInt(temp[i].trim());

                                int odd;

                                int even = odd = 1;          //takes into account addition of one at the end, for convenience

                                for(int i: array)

                                {

                                                if(i % 2 == 0)

                                                                even += WHORLS[i];

                                                else

                                                                odd += WHORLS[i];

                                }

                                return "" + even + "/" + odd;

                }

}