How would I know which player selected first.

I am trying to create a two player game is which there is two button.

If a player selected one button then that button will be disabled for opponent.

I am able to implement the above scenario and its working only if there is some delay(approx 500 ms) between both player.

If both players are selecting the same button together then its taking input of both player, not able to block the another player.

Can somebody please suggest some idea to solve this issue?