The one on the right is the MegaDrive one, three buttons + a start button. The C button is by your left thumb.
The other only has the one button despite the label showing A + B buttons. Dunno about the pinout but they used the Atari style plug and will have worked fine on Amiga just like the MegaDrive pads did back in the day.
I had one back in the day for my Speccy and despite it being advertised as indestructible I managed to break the red plastic off the stick during a particularly furious swim in Hyper Sports. Had a lovely wound in the centre of my palm for my trouble too. Still my favourite joystick even with just the metal shaft left for the stick and served me well into my Amiga days. Never saw the MegaDrive one in the wild but saw a few Master System ones with 2 buttons. Couldn't believe it when it came up on eBay.
Impressive. If I recall correctly those things had like a 5mm metal shaft molded into the stick. I don’t think mine ever broke, despite some fairly heavy use. I recall the auto fire switch being pretty flimsy though.