'If yes' doesn't sound natural. We would understand it, obviously, but a native speaker would be unlikely to say 'If yes' or 'If no'.
We would either say 'If so' or 'If not', or echo the subject and auxiliary verb. For example:
Do you have a European Community passport? If you do, you can go straight through customs. If you don't, you'll need to wait here to have your passport stamped.