You may combine IFs and Ands to create a composite condition. Try the following formula and see whether it works.
=IF(OR(AND(A1="Yes",B1="Yes"), AND(A1="No", B1="No")), 0, IF(AND(A1="Yes",B1="No"), 100,IF(AND(A1="No",B1="Yes"),-101,"Error")))
See the results
Some references
https://support.microsoft.com/en-us/office/use-nested-functions-in-a-formula-9d7c966d-6030-4cd6-a052-478d7d844166
https://www.ablebits.com/office-addins-blog/if-and-formula-in-excel/
Hope this helps