Haydn was Mozart's teacher for a while in Vienna, and both men respected each other's abilities and works.