import std.algorithm;
import std.string;
import std.range;
import std.stdio;
void main ()
{
foreach (s; 0..16)
{
int counter = 0;
bool fun (int x, int y)
{
counter++;
return !(s & (1 << x)) == !(s & (1 << y));
}
if ((fun (0, 2) && fun (1, 3)) || (fun (0, 3) && fun (1, 2)))
{
}
writeln (format ("%04b", s).retro, ": ", counter);
}
}
aW1wb3J0IHN0ZC5hbGdvcml0aG07CmltcG9ydCBzdGQuc3RyaW5nOwppbXBvcnQgc3RkLnJhbmdlOwppbXBvcnQgc3RkLnN0ZGlvOwoKdm9pZCBtYWluICgpCnsKCWZvcmVhY2ggKHM7IDAuLjE2KQoJewoJCWludCBjb3VudGVyID0gMDsKCgkJYm9vbCBmdW4gKGludCB4LCBpbnQgeSkKCQl7CgkJCWNvdW50ZXIrKzsKCQkJcmV0dXJuICEocyAmICgxIDw8IHgpKSA9PSAhKHMgJiAoMSA8PCB5KSk7CgkJfQoKCQlpZiAoKGZ1biAoMCwgMikgJiYgZnVuICgxLCAzKSkgfHwgKGZ1biAoMCwgMykgJiYgZnVuICgxLCAyKSkpCgkJewoJCX0KCgkJd3JpdGVsbiAoZm9ybWF0ICgiJTA0YiIsIHMpLnJldHJvLCAiOiAiLCBjb3VudGVyKTsKCX0KfQo=