Try using something like this as the conditional formatting criteria for A1:B2.
Formula: copy to clipboard
=COUNTIFS($E:$E,$A1,$F:$F,$B1)

Then for E1:F2
Formula: copy to clipboard
=COUNTIFS($A:$A,$E1,$B:$B,$F1)