や否や

Usage

as soon as; the moment ~; the minute (that); no sooner than ~

Examples

先生が教室に入るや否や、学生たちはおしゃべりを辞めた As soon as the teacher entered the classroom, the students stopped talking
友達の赤ん坊が私の顔を見るや否や、泣き出した As soon as my friend's baby saw my face, it started crying