• + 1 comment

    My Python code that passed all test cases:

    def solve(a, b, x, y):
        if math.gcd(a, b) == math.gcd(x, y):
            return "YES"
        return "NO"