And no they don't have to be different brands.... the appropriate buttons/sticks on the gamepads for each respective game input.
The one problem that
might occur more often with same brand & model is the pads might be renumbered (reordered) on reboot. It doesn't always happen with same brand or model, and it has happened with different brands too. Which USB port(s) they are plugged into, what (if any) hub(s) are used, and the motherboard seem to make a difference.
FYI, the numbering is due to USB standards (plug & play, device "IDs"), timing issues (the order the devices "check in" to the the computer can change at boot up), windows (how it tracks devices), and directX (mame numbers the devices in the order directX "gives" them to mame).