query

The goal, as a yes solution solves it (its variables bound), otherwise as it was asked, as Prolog text