PP2014 Prolog Homework