A solution to problem A2 of the 21st International Mathematical Olympiad using Clojure's core.logic