You dont neccessarily need binary operations here. Boolean logic would be enough.
Look at each of the booleans separately and try to find a formula which works only for that boolean.

For example,...