import java.util.Scanner;public class hdu1059 {//01背包public static boolean bag(int[] weight,int[] value,int V){int[] res = new int[V+1];for (int i = 0; i < weight.length; i++) {for (int j = V; j >= weight[i]; j--) {res[j] = Math.max(res[j] , res[j-weight[i]]+value[i]);}}return (V == res[V]);}public static void main(String[] args) {Scanner sc = new Scanner(System.in);int kkk = 0;while (sc.hasNext()){int a = sc.nextInt();int b = sc.nextInt();int c = sc.nextInt();int d = sc.nextInt();int e = sc.nextInt();int f = sc.nextInt();kkk++;if (a==0 && b==0 && c==0 && d==0&& e==0&& f==0){break;}int sum = a+2*b+3*c+4*d+5*e+6*f;if (sum%2==1){System.out.println("Collection #"+kkk+":");System.out.println("Can't be divided.");System.out.println();}else{int[] weight = new int[90];int[] value = new int[90];//int[] w = {a,c,e};int[] s = {a,b,c,d,e,f};int k = 0;for (int i = 0; i < 6; i++) {for (int j = 1; j <= s[i]; j=j*2) {weight[k] =(i+1)*j;value[k] = (i+1)*j;k++;s[i] -= j;}if (s[i] != 0){weight[k] = (i+1)*s[i];value[k] = (i+1)*s[i];k++;}}if (bag(weight,value,sum/2)){System.out.println("Collection #"+kkk+":");System.out.println("Can be divided.");System.out.println();}else{System.out.println("Collection #"+kkk+":");System.out.println("Can't be divided.");System.out.println();}}}} }