diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -1,6 +1,6 @@
 a, b = map(int, input().split())
 
-if b - a or b - a == 9:
+if b - a == 1 or b - a == 9:
     print("Yes")
 else:
     print("No")
