Sorry, misinterpreted you...

Try:

=OR(AND(A3="",A1=""),AND(A2="",A3<>""))

copied down.