# Anyone know prolog?

Given this list: [[1, 2], [2, 3], [3, 4]] how do you make it say Yes if 2 (of the first list) = 2 (of second list) and 3 (of second list) = 3 (of third list)? I'm having trouble visualizing this fact as the elements in the lists are lists, so we are basically dealing/recursing a list within a list.