diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -10,7 +10,7 @@
     print("Yes")
 elif B == C and B != 0:
     print("Yes")
-elif A == 0 or D == 0:  # B=C=0
+elif B == C and (A == 0 or D == 0):  # B=C=0
     print("Yes")
 else:
     print("No")
