Help me in solving TWOCARD problem

My issue

Not sure why I am getting Wrong Answer.

cook your dish here

T = input()
for i in range(int(T)):
N = int(input())
# print(N)
x = input().split(" “)
y = input().split(” “)
mx = float(”-inf")
dict = {}
for j in range(N):
xy_max = max(int(x[j]),int(y[j]))
if mx < xy_max:
mx = xy_max
if mx not in dict:
dict[mx] = 1
else:
dict[mx] += 1

if len(dict) != 1:
    print("Yes")
else:
    print("No")

please advise.

My code

# cook your dish here
T = input()
for i in range(int(T)):
    N = int(input())
    # print(N)
    x = input().split(" ")
    y = input().split(" ")
    mx = float("-inf")
    dict = {}
    for j in range(N):
        xy_max = max(int(x[j]),int(y[j]))
        if mx < xy_max:
            mx = xy_max
            if mx not in dict:
                dict[mx] = 1
            else:
                dict[mx] += 1
        
    if len(dict) != 1:
        print("Yes")
    else:
        print("No")

Problem Link: Two Cards Practice Coding Problem

include <stdio.h>

int main() {
// Define the sides of the rectangle
int length = 11;
int breadth = 13;

// Calculate the area
int area = length * breadth;

// Calculate the perimeter
int perimeter = 2 * (length + breadth);

// Output the results
printf("Area of the rectangle: %d\n", area);
printf("Perimeter of the rectangle: %d\n", perimeter);

return 0;

}