are logic puzzles math