#include <bits/stdc++.h>
using namespace std;
const int N = 6e4 + 10;
bitset<N> f;
bool check(const vector<int>& a) {
int sum = 0;
for (int i = 0; i < a.size(); ++i) {
sum += a[i] * (i + 1);
}
if (sum & 1)
return false;
sum /= 2;
f.reset();
f[0] = true;
for (int i = 0; i < a.size(); ++i) {
for (int j = sum; j > i; --j) {
if (f[j]) continue;
for (int k = 1; k <= a[i] && j - k * (i + 1) >= 0; ++k) {
if (f[j - k * (i + 1)]) {
f[j] = true;
break;
}
}
}
if (f[sum])
return true;
}
return false;
}
signed main() {
#ifndef ONLINE_JUDGE
freopen(".in", "r", stdin);
#else
cin.tie(0)->sync_with_stdio(0);
#endif
for (int k = 1;; ++k) {
vector<int> a;
copy_n(istream_iterator<int>(cin), 6, back_inserter(a));
if (all_of(a.begin(), a.end(), [](const int v) { return v == 0; }))
break;
cout << "Collection #" << k << "\n";
cout << (check(a) ? "Can" : "Can't") << " be divided.\n\n";
}
}