And Condition Logic For Three Variables