dist(x,y) andavg(A,B) = 1 |A| |B| X