latin: pairwise loop through rows