diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -1,7 +1,7 @@
 S = input()
 T = input()
 A = ["R G B", "B R G", "G B R"]
-if S in A == T in A:
+if (S in A) == (T in A):
     print("Yes")
 else:
     print("No")
