/*
Name: Dividing - PKU 1014
Author: Mars
Description: DP
Result: 2231562 bestzsx 1014 Accepted 520K 421MS C++ 1617B 2007-05-29 21:30:22
*/
#include <iostream>
#include <string>
using namespace std;
const int N = 6;
int c[N+1];
bool st[N+1][10000*N];
int maxItem[N+1];
int total;
string solvable = "Can be divided./n";
string unsolvable = "Can't be divided./n";
int _main() {
int i,j,k,h;
int flag;
int cases=0;
while (true) {
flag = 0;
total = 0;
for (i=1;i<=N;++i) {
cin>>c[i];
if (c[i]>0) {
flag = 1;
total += i*c[i];
}
}
if (!flag) break;
++cases;
if (cases>1) cout<<"/n";
cout<<"Collection #"<<cases<<":/n";
// solve now; flag = 1
memset(st,0,sizeof(st));
if (total % 2) {
flag = 0;
cout<<unsolvable;
} else {
total = total / 2;
// state 1
for (i=0;i<=c[1];++i) {
st[1][i] = true;
}
c[0] = 0;
for (i=1;i<=N;++i) {
maxItem[i] = i*c[i]+maxItem[i-1];
if (maxItem[i]>total) maxItem[i] = total;
}
//
flag = 0;
for (i=2;i<=5;++i) {
for (k=maxItem[i];k>=0;--k) {
if (st[i][k]) continue;
j = k/i;
if (j>c[i]) j = c[i];
for (;j>=0;--j) {
if (st[i-1][k-i*j]) {
for (h=0;h<=j;++h)
st[i][k-i*h] = true;
break;
}
}
if (st[i][total]) {
flag = 1;
break;
}
}
if (flag) break;
}
//
if (flag) {
cout<<solvable;
continue;
}
// state 6
for (j=0;j<=c[6];++j) {
if ((total-6*j)<0)
break;
else if (st[5][total-6*j]) {
st[6][total] = true;
break;
}
}
if (st[6][total]) cout<<solvable;
else cout<<unsolvable;
}
}
return 0;
}