prolog - magnesy