diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -4,4 +4,4 @@
 x = r - l
 for i in range(x):
     for j in range(i + 1):
-        gcd(l + j, x - i) == 1 or exit(print(x - i))
+        gcd(l + j, x - i) == 1 and exit(print(x - i))
