Since you say you only have two binary predictors, there is only 1 degree of freedom for each main effect and their interaction. So you could use a model specification like this, assuming the variables are A and B with values 'yes' and 'no':
ba*(a='yes') + bb*(b='yes') + bab*(a='yes')*(b='yes')
You can see examples of using this construction in these notes: 60240, 37228, 48506 and 44931.
... View more