output pairwise distances