If BC,CA and AB are the sides of a triangle ABC whose midpoints are (p,0,0),(0,q,0),(0,0,r) then find (AB)2+(BC)2+(CA)2p2+q2+r2