Prolog day 1 problems 3&4 - variation :)