Cain uses arm, bat to lead Giants over D-backs 5-2