#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> zapatillas(N);
unordered_map<int, int> conteo;
for (int i = 0; i < N; i++) {
cin >> zapatillas[i];
conteo[zapatillas[i]]++;
}
vector<int> a_tirar;
int total_a_tirar = 0;
for (const auto& par : conteo) {
if (par.second % 2 != 0) {
a_tirar.push_back(par.first);
total_a_tirar += 1;
}
}
if (total_a_tirar == 0) {
cout << ":D" << endl;
} else {
for (int id : a_tirar) {
cout << id << " ";
}
cout << endl;
}
cout << total_a_tirar << endl;
cout << N - total_a_tirar << endl;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKICAgIGludCBOOwogICAgY2luID4+IE47CiAgICB2ZWN0b3I8aW50PiB6YXBhdGlsbGFzKE4pOwogICAgdW5vcmRlcmVkX21hcDxpbnQsIGludD4gY29udGVvOwoKICAgIGZvciAoaW50IGkgPSAwOyBpIDwgTjsgaSsrKSB7CiAgICAgICAgY2luID4+IHphcGF0aWxsYXNbaV07CiAgICAgICAgY29udGVvW3phcGF0aWxsYXNbaV1dKys7CiAgICB9CgogICAgdmVjdG9yPGludD4gYV90aXJhcjsKICAgIGludCB0b3RhbF9hX3RpcmFyID0gMDsKCiAgICBmb3IgKGNvbnN0IGF1dG8mIHBhciA6IGNvbnRlbykgewogICAgICAgIGlmIChwYXIuc2Vjb25kICUgMiAhPSAwKSB7CiAgICAgICAgICAgIGFfdGlyYXIucHVzaF9iYWNrKHBhci5maXJzdCk7CiAgICAgICAgICAgIHRvdGFsX2FfdGlyYXIgKz0gMTsKICAgICAgICB9CiAgICB9CgogICAgaWYgKHRvdGFsX2FfdGlyYXIgPT0gMCkgewogICAgICAgIGNvdXQgPDwgIjpEIiA8PCBlbmRsOwogICAgfSBlbHNlIHsKICAgICAgICBmb3IgKGludCBpZCA6IGFfdGlyYXIpIHsKICAgICAgICAgICAgY291dCA8PCBpZCA8PCAiICI7CiAgICAgICAgfQogICAgICAgIGNvdXQgPDwgZW5kbDsKICAgIH0KICAgIAogICAgY291dCA8PCB0b3RhbF9hX3RpcmFyIDw8IGVuZGw7CiAgICBjb3V0IDw8IE4gLSB0b3RhbF9hX3RpcmFyIDw8IGVuZGw7CgogICAgcmV0dXJuIDA7Cn0=