Ram and Shyam are playing a game of Truth and Dare. In this game, Shyam will ask Ram to perform tasks of two types:
- Truth task: Ram has to truthfully answer a question.
- Dare task: Ram has to perform a given task.
Each task is described by an integer. (If a truth task and a dare task are described by the same integer, they are still different tasks.) You are given four lists of tasks:
- $T_{r, 1}, T_{r, 2}, \dots, T_{r, t_r}$: the truth tasks Ram can perform.
- $D_{r, 1}, D_{r, 2}, \dots, D_{r, d_r}$: the dare tasks Ram can perform.
- $T_{s, 1}, T_{s, 2}, \dots, T_{s, t_s}$: the truth tasks Shyam can ask Ram to perform.
- $D_{s, 1}, D_{s, 2}, \dots, D_{s, d_s}$: the dare tasks Shyam can ask Ram to perform.
Note that the elements of these lists are not necessarily distinct, each task may be repeated any number of times in each list.
Shyam wins the game if he can find a task Ram cannot perform. Ram wins if he performs all tasks Shyam asks him to. Find the winner of the game.
Let's take an example where Ram can perform truth tasks $3$, $2$ and $5$ and dare tasks $2$ and $100$, and Shyam can give him truth tasks $2$ and $3$ and a dare task $100$. We can see that whichever truth or dare tasks Shyam asks Ram to perform, Ram can easily perform them, so he wins. However, if Shyam can give him dare tasks $3$ and $100$, then Ram will not be able to perform dare task $3$, so Shyam wins.

-----Input-----
- The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.
- The first line of each test case contains a single integer $t_r$.
- The second line contains $t_r$ space-separated integers $T_{r, 1}, T_{r, 2}, \dots, T_{r, t_r}$.
- The third line contains a single integer $d_r$.
- The fourth line contains $d_r$ space-separated integers $D_{r, 1}, D_{r, 2}, \dots, D_{r, d_r}$.
- The fifth line contains a single integer $t_s$.
- The sixth line contains $t_s$ space-separated integers $T_{s, 1}, T_{s, 2}, \dots, T_{s, t_s}$.
- The seventh line contains a single integer $d_s$.
- The eighth line contains $d_s$ space-separated integers $D_{s, 1}, D_{s, 2}, \dots, D_{s, d_s}$.

-----Output-----
For each test case, print a single line containing the string "yes" if Ram wins the game or "no" otherwise.

-----Constraints-----
- $1 \le T \le 100$
- $1 \le t_r, d_r, t_s, d_s \le 100$
- $1 \le T_{r, i} \le 100$ for each valid $i$
- $1 \le D_{r, i} \le 100$ for each valid $i$
- $1 \le T_{s, i} \le 100$ for each valid $i$
- $1 \le D_{s, i} \le 100$ for each valid $i$

-----Example Input-----
4
2
1 2
3
1 3 2
1
2
2
3 2
2
1 2
3
1 3 2
1
2
3
3 2 4
3
3 2 5
2
2 100
1
2
1
100
2
1 2
3
1 3 2
1
2
3
3 2 2

-----Example Output-----
yes
no
yes
yes

-----Explanation-----
Example case 1: Ram's truth tasks are $[1, 2]$ and his dare tasks are $[1, 3, 2]$. Shyam's truth tasks are $[2]$ and his dare tasks are $[3, 2]$. Ram can perform all tasks Shyam gives him.
Example case 2: Ram's truth tasks are $[1, 2]$ and his dare tasks are $[1, 3, 2]$. Shyam's truth tasks are $[2]$ and his dare tasks are $[3, 2, 4]$. If Shyam asks Ram to perform dare task $4$, Ram will not be able to do it.

Difficulty: interview

Starter code:

Solutions:
# cook your dish here
for _ in range(int(input())):
    tr=int(input())
    trl=list(map(int,input().split()))
    dr = int(input())
    drl = list(map(int, input().split()))
    ts = int(input())
    tsl = list(map(int, input().split()))
    ds = int(input())
    dsl = list(map(int, input().split()))
    for item in tsl:
        if item in trl:
            res=1
            continue
        else:
            res=0
            break
    for item1 in dsl:
        if item1 in drl:
            res1=1
            continue
        else:
            res1=0
            break
    if res==1 and res1==1:
        print("yes")
    else:
        print("no")


# cook your dish here
for i in range(int(input())):
    Tr = int(input())
    Tr = list(map(int,input().split()))
    Dr = int(input())
    Dr = list(map(int,input().split()))
    Ts = int(input())
    Ts = list(map(int,input().split()))
    Ds = int(input())
    Ds = list(map(int,input().split()))
    for i in Ts:
        if i not in Tr:
            print("no")
            break
    else:
        for j in Ds:
            if j not in Dr:
                print("no")
                break
        else:
            print("yes")




for i in range(int(input())):
    _ = int(input())
    Tr = list(map(int, input().split()))
    _ = int(input())
    Dr = list(map(int, input().split()))
    _ = int(input())
    Ts = list(map(int, input().split()))
    _ = int(input())
    Ds = list(map(int, input().split()))
    
    for j in Ts:
        if j not in Tr:
            print("no")
            break
    else:
        for k in Ds:
            if k not in Dr:
                print("no")
                break
        else:
            print("yes")

# cook your dish here

for i in range(int(input())):
    _ = int(input())
    Tr = list(map(int, input().split()))
    _ = int(input())
    Dr = list(map(int, input().split()))
    _ = int(input())
    Ts = list(map(int, input().split()))
    _ = int(input())
    Ds = list(map(int, input().split()))
    
    for j in Ts:
        if j not in Tr:
            print("no")
            break
    else:
        for k in Ds:
            if k not in Dr:
                print("no")
                break
        else:
            print("yes")

for i in range(int(input())):
    trn = int(input())
    tr = input().split(" ")
    drn = int(input())
    dr = input().split(" ")
    tsn = int(input())
    ts = input().split(" ")
    dsn = int(input())
    ds = input().split(" ")
    for j in ts:
        if j not in tr:
            print("no")
            break
    else:
        for k in ds:
            if k not in dr:
                print("no")
                break
        else:
            print("yes")
    
    

def Check(ram,shyam):
    for i in shyam:
        if i not in ram:
            return False
    return True

for _ in range(int(input())):
    tR = int(input())
    Tr = list(map(int,input().split()))
    dR = int(input())
    Dr = list(map(int,input().split()))
    tS = int(input())
    Ts = list(map(int,input().split()))
    dS = int(input())
    Ds = list(map(int,input().split()))
    truthCheck = Check(Tr,Ts)
    dareCheck = Check(Dr,Ds)
    if ( truthCheck and dareCheck ):
        print("yes")
    else:
        print("no")
    


def Check(ram,shyam):
    for i in shyam:
        if i not in ram:
            return False
    return True

for _ in range(int(input())):
    tR = int(input())
    Tr = list(map(int,input().split()))
    dR = int(input())
    Dr = list(map(int,input().split()))
    tS = int(input())
    Ts = list(map(int,input().split()))
    dS = int(input())
    Ds = list(map(int,input().split()))
    truthCheck = Check(Tr,Ts)
    dareCheck = Check(Dr,Ds)
    if ( truthCheck and dareCheck ):
        print("yes")
    else:
        print("no")
    

# cook your dish here
for _ in range(int(input())):
    rt = int(input())
    tr= list(map(int,input().split()))
    rd = int(input())
    dr = list(map(int,input().split()))
    st = int(input())
    ts = list(map(int,input().split()))
    sd = int(input())
    ds = list(map(int,input().split()))
    l = []
    for i in ts:
        if i in tr:
            l.append('y')
        else:
            l.append('no')
    for i in ds:
        if i in dr:
            l.append('y')
        else:
            l.append('no')
    if "no" in l:
        print("no")
    else:
        print("yes") 

# cook your dish here
t = int(input())
for i in range(t):
    truthtasks = []
    daretasks = []
    tr = int(input())
    TR = list(map(int, input().split()))
    dr = int(input())
    DR = list(map(int, input().split()))
    ts = int(input())
    TS = list(map(int, input().split()))
    ds = int(input())
    DS = list(map(int, input().split()))
    for i in TS:
        if i in TR:
            flag = 1
        else:
            flag = 0
            break
    if flag:
        for j in DS:
            if j in DR:
                flag = 1
            else:
                flag = 0
                break
    if flag:
        print('yes')
    else:
        print('no')
   
            
            
            
            

for _ in range(int(input())):
    tr = int(input())
    Tr = list(map(int, input().split()))
    dr = int(input())
    Dr = list(map(int, input().split()))
    ts = int(input())
    Ts = list(map(int, input().split()))
    ds = int(input())
    Ds = list(map(int, input().split()))
    
    for truth_s in Ts:
        if truth_s in Tr:
            #Tr.remove(truth_s)
            flag = 1
        else:
            flag = 0
            break 
    if flag:
        for dare_s in Ds:
            if dare_s in Dr:
                #Dr.remove(dare_s)
                flag = 1
            else:
                flag = 0
                break
    
    if flag:
        print('yes')
    else:
        print('no')

# cook your dish here
try:
    for _ in range(int(input())):
        c,d=0,0
        t1=int(input())
        r1=list(map(int,input().split()))
        d1=int(input())
        r2=list(map(int,input().split()))
        t2=int(input())
        r3=list(map(int,input().split()))
        d2=int(input())
        r4=list(map(int,input().split()))
        for i in range(t2):
            a=r3[i]
            if a in r1:
                c=c+1
        for i in range(d2):
            b=r4[i]
            if b in r2:
                d=d+1
        if c==len(r3) and d==len(r4):
            print("yes")
        else:
            print("no")
except:
    pass

for _ in range(int(input())):
    t_r = int(input())
    tr = list(map(int, input().split()))
    d_r = int(input())
    dr = list(map(int, input().split()))
    t_s = int(input())
    ts = list(map(int, input().split()))
    d_s = int(input())
    ds = list(map(int, input().split()))
    l = []
    for i in ts:
        if i in tr:
            l.append('y')
        else:
            l.append('no')
    for i in ds:
        if i in dr:
            l.append('y')
        else:
            l.append('no')
    if "no" in l:
        print("no")
    else:
        print("yes")

# cook your dish here
for _ in range(int(input())):
    t_r = int(input())
    tr = list(map(int, input().split()))
    d_r = int(input())
    dr = list(map(int, input().split()))
    t_s = int(input())
    ts = list(map(int, input().split()))
    d_s = int(input())
    ds = list(map(int, input().split()))
    
    flag = True
    
    for t in ts:
        if t not in tr:
            flag = False
            break
    
    if flag:
        for d in ds:
            if d not in dr:
                flag = False
                break
    
    print("yes" if flag else "no")

# cook your dish here
for _ in range(int(input())):
    t_r = int(input())
    tr = list(map(int, input().split()))
    d_r = int(input())
    dr = list(map(int, input().split()))
    t_s = int(input())
    ts = list(map(int, input().split()))
    d_s = int(input())
    ds = list(map(int, input().split()))
    
    flag = True
    
    for t in ts:
        if t not in tr:
            flag = False
            break
    
    if flag:
        for d in ds:
            if d not in dr:
                flag = False
                break
    
    print("yes" if flag else "no")

for _ in range(int(input())):
    t1=int(input())
    ta1=list(map(int,input().split()))
    d1=int(input())
    da1=list(map(int,input().split()))
    t2=int(input())
    ta2=list(map(int,input().split()))
    d2=int(input())
    da2=list(map(int,input().split()))
    if(set(ta2).issubset(set(ta1)) and set(da2).issubset(set(da1))):
        print("yes")
    else:
        print("no")

def bs(a,n,k): 
    l=0 
    h=n-1 
    while(l<=h): 
        mid=(l+h)//2
        if a[mid]==k: 
            return 1
        if a[mid]<k: 
            l=mid+1 
        else: 
            h=mid-1 
    return 0
    
    
t=int(input())
for kk in range(t): 
    ntr=int(input()) 
    tr=[int(x) for x in input ().split()] 
    tr.sort()
    ndr=int(input ()) 
    dr=[int(x) for x in input (). split ()] 
    dr.sort()
    nts=int(input ()) 
    ts=[int(x) for x in input ().split()] 
    nds=int(input ()) 
    ds=[int(x) for x in input ().split()] 
    s=1
    for i in range(nts):  
        if bs(tr,ntr,ts[i]): 
            continue 
        else: 
            s=0 
            break
    if s==0: 
        print("no") 
        continue
    for i in range(nds): 
        if bs(dr,ndr,ds[i]): 
            continue
        else: 
            s=0 
            break
    if s==0: 
        print("no")
        continue
    if s==1: 
        print("yes")
     
        
    

try:
    for _ in range(int(input())):
        n=int(input())
        d=list(map(int,input().split()))
        s=int(input())
        p=list(map(int,input().split()))
        o=int(input())
        t=list(map(int,input().split()))
        w=int(input())
        q=list(map(int,input().split()))
        l=[]
        for i in t:
            if i in d:
                l.append("y")
            else:
                l.append("no")
        for i in q:
            if i in p:
                l.append("y")
            else:
                l.append("no")         
                
        if "no" in l:
            print("no")
        else:
            print("yes")
except:
    pass




try:
    t = int(input())
    result = []
    for i in range(t):
        check1 = True
        check2 = True
        tr = int(input())
        trl = list(map(int, input().split()))
        dr = int(input())
        drl = list(map(int, input().split()))
        ts = int(input())
        tsl = list(map(int, input().split()))
        ds = int(input())
        dsl = list(map(int, input().split()))

        for j in range(ts):
            if (tsl[j] not in trl):
                check1 = False
            else:
                continue

        for k in range(ds):
            if (dsl[k] not in drl):
                check2 = False
            else:
                continue

        if (check1 == True and check2 == True):
            result.append("yes")
        else:
            result.append("no")

    for b in result:
        print(b)



except:
    pass

# cook your dish here
for _ in range(int(input())):
    t_r = int(input())
    tr = list(map(int, input().split()))
    d_r = int(input())
    dr = list(map(int, input().split()))
    t_s = int(input())
    ts = list(map(int, input().split()))
    d_s = int(input())
    ds = list(map(int, input().split()))
    
    flag = True
    
    for t in ts:
        if t not in tr:
            flag = False
            break
    
    if flag:
        for d in ds:
            if d not in dr:
                flag = False
                break
    
    print("yes" if flag else "no")


# cook your dish here
for _ in range(int(input())):
    t_r = int(input())
    tr = list(map(int, input().split()))
    d_r = int(input())
    dr = list(map(int, input().split()))
    t_s = int(input())
    ts = list(map(int, input().split()))
    d_s = int(input())
    ds = list(map(int, input().split()))
    
    flag = True
    
    for t in ts:
        if t not in tr:
            flag = False
            break
    
    if flag:
        for d in ds:
            if d not in dr:
                flag = False
                break
    
    print("yes" if flag else "no")


# cook your dish here
for _ in range(int(input())):
    t_r = int(input())
    tr = list(map(int, input().split()))
    d_r = int(input())
    dr = list(map(int, input().split()))
    t_s = int(input())
    ts = list(map(int, input().split()))
    d_s = int(input())
    ds = list(map(int, input().split()))
    
    flag = True
    
    for t in ts:
        if t not in tr:
            flag = False
            break
    
    if flag:
        for d in ds:
            if d not in dr:
                flag = False
                break
    
    print("yes" if flag else "no")

# cook your dish here
# cook your dish here
for _ in range(int(input())):
    t_r = int(input())
    tr = list(map(int, input().split()))
    d_r = int(input())
    dr = list(map(int, input().split()))
    t_s = int(input())
    ts = list(map(int, input().split()))
    d_s = int(input())
    ds = list(map(int, input().split()))
    
    flag = True
    
    for t in ts:
        if t not in tr:
            flag = False
            break
    
    if flag:
        for d in ds:
            if d not in dr:
                flag = False
                break
    
    print("yes" if flag else "no")

# cook your dish here
for _ in range(int(input())):
    t_r = int(input())
    tr = list(map(int, input().split()))
    d_r = int(input())
    dr = list(map(int, input().split()))
    t_s = int(input())
    ts = list(map(int, input().split()))
    d_s = int(input())
    ds = list(map(int, input().split()))
    
    flag = True
    
    for t in ts:
        if t not in tr:
            flag = False
            break
    
    if flag:
        for d in ds:
            if d not in dr:
                flag = False
                break
    
    print("yes" if flag else "no")# cook your dish here


# cook your dish here
for _ in range(int(input())):
    t_r = int(input())
    tr = list(map(int, input().split()))
    d_r = int(input())
    dr = list(map(int, input().split()))
    t_s = int(input())
    ts = list(map(int, input().split()))
    d_s = int(input())
    ds = list(map(int, input().split()))
    
    flag = True
    
    for t in ts:
        if t not in tr:
            flag = False
            break
    
    if flag:
        for d in ds:
            if d not in dr:
                flag = False
                break
    
    print("yes" if flag else "no")
    
    

for _ in range(int(input())):
    t_r = int(input())
    tr = list(map(int, input().split()))
    d_r = int(input())
    dr = list(map(int, input().split()))
    t_s = int(input())
    ts = list(map(int, input().split()))
    d_s = int(input())
    ds = list(map(int, input().split()))
    
    flag = True
    
    for t in ts:
        if t not in tr:
            flag = False
            break
    
    if flag:
        for d in ds:
            if d not in dr:
                flag = False
                break
    
    print("yes" if flag else "no")