(1) Use spray with water to spray their head;
(2) point little strongly to their noses by using 1 finger (need to direct touch, little light hit but no stron hitting of course) and scold them.
I use Method 2 since my cats are small, it is effective, by reeating and repeating...later they know even you do not point their nose...