Long-distance interactions of branes: Correspondence between supergravity and super Yang-Mills descriptions