Mexico and Canada agree to border security deals, avoiding Trump tariffs