Print all valid pairs of curves