Optimal local discrimination of two multipartite pure states