Shape match

Find all pairs