qyliang/CodeNanoFix huggingface dataset:
Buggy code:
N,M,X,Y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
#print(N,M,X,Y,x,y)
x.append(X)
y.append(Y)
if(max(x)>min(y)):
  print('War')
else:
  print('No War')



Fixed code:
N,M,X,Y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
#print(N,M,X,Y,x,y)
x.append(X)
y.append(Y)
if((max(x)+1)>min(y) or (X+1)>Y):
  print('War')
else:
  print('No War')
Buggy code:
N,M,X,Y = map(int,input().split())
x = list(map(int,input().split()))
y = list(map(int,input().split()))

mx = max(x)
my = min(y)

if my - mx > 1:
    mxx = mx
    for i in range(my - mx - 1):
        mxx += 1
        if X < mxx and mxx <= Y and my >= mxx:
            print("No War")
            exit()
print("War")


Fixed code:
N,M,X,Y = map(int,input().split())
x = list(map(int,input().split()))
y = list(map(int,input().split()))

mx = max(x)
my = min(y)

if my - mx > 0:
    Z = mx
    for i in range(my - mx):
        Z += 1
        if X < Z and Z <= Y and mx < Z and Z <= my:
            print("No War")
            exit()
print("War")
Buggy code:
N,M,X,Y = map(int,input().split())

x = list(map(int,input().split()))
y = list(map(int,input().split()))
ans = 'War'
for i in range(-100,101):
    if X < i <= Y and max(x)<i and max(y)>=i:
        ans = 'No War'
        break
print(ans)

Fixed code:
N,M,X,Y = map(int,input().split())

x = list(map(int,input().split()))
y = list(map(int,input().split()))
ans = 'War'
for i in range(-100,101):
    if X < i <= Y and max(x)<i and min(y)>=i:
        ans = 'No War'
        break
print(ans)
Buggy code:
N,M,X,Y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
x.sort(reverse=True)
y.sort()
a=0
for z in range(X+1,Y+1):
    if z>x[0] and z<=y[0]:
        a=1
        break
if a=1:
    print('No War')
else:
    print('War')


Fixed code:
N,M,X,Y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
x.sort(reverse=True)
y.sort()
a=0
for z in range(X+1,Y+1):
    if z>x[0] and z<=y[0]:
        a=1
        break
if a==1:
    print('No War')
else:
    print('War')
Buggy code:
n,m,x,y = map(int,input().split())
a = list(map(int,input().split()))
a.append(x)
b = list(map(int,input().split()))
b.append(y)
for i in range(x+1,y+1):
  if max(a) < i <= max(b):
    print("No War")
    break
else:
  print("War")

Fixed code:
n,m,x,y = map(int,input().split())
a = list(map(int,input().split()))
a.append(x)
b = list(map(int,input().split()))
b.append(y)
for i in range(x+1,y+1):
  if max(a) < i <= min(b):
    print("No War")
    break
else:
  print("War")
Buggy code:
ai = lambda: list(map(int,input().split()))
ai_ = lambda: [int(x)-1 for x in input().split()]

n,m,X,Y = ai()
x = ai()
y = ai()
if max(x)<min(y):
    print('No War')
else:
    print('War')

Fixed code:
ai = lambda: list(map(int, input().split()))
ai_ = lambda: [int(x) - 1 for x in input().split()]

n, m, X, Y = ai()
x = ai()
y = ai()
if max(x) < min(y) and X < max(x)+1 <= Y:
    print('No War')
else:
    print('War')
Buggy code:
n,m,x,y=map(int,input().split())
s=list(map(int,input().split()))
t=list(map(int,input().split()))
c=0
max_x=max(s)
min_y=min(t)

for i in range(x+1,y+1):
    if i>max_x and i<=min_y:
        c+=1
if c>0:
    print('No war')
else:
    print('War')
    

Fixed code:
n,m,x,y=map(int,input().split())
s=list(map(int,input().split()))
t=list(map(int,input().split()))
c=0
max_x=max(s)
min_y=min(t)

for i in range(x+1,y+1):
    if i>max_x and i<=min_y:
        c+=1
if c>0:
    print('No War')
else:
    print('War')
Buggy code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    flg=0
    n,m,x,y=INTM()
    xs=LIST()
    xs.append(x)
    ys=LIST()
    ys.append(y)
    #print(xs,ys)
    if max(xs)>=min(ys):
        flg=1
    if flg==0:
        print('No war')
    else:
        print('War')
    
    
if __name__ == '__main__':
    do()

Fixed code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    n,m,x,y=INTM()
    xs=LIST()
    xs.append(x)
    ys=LIST()
    ys.append(y)
    #print(xs,ys)
    if max(xs)>=min(ys):
        print('War')
    else:
        print('No War')
    
    
if __name__ == '__main__':
    do()
Buggy code:
n,m,x,y = map(int,input().split())
X = list(map(int,input().split()))
Y = list(map(int,input().split()))

if x<y and max(X)<min(Y):
	print("No War")
else:
	print("War")

Fixed code:
n,m,x,y = map(int,input().split())
X = list(map(int,input().split()))
Y = list(map(int,input().split()))

if x<y and max(X)<min(Y) and x<min(Y) and max(X)<y:
	print("No War")
else:
	print("War")
Buggy code:
N,M,X,Y=map(int,input().split())
x,y=map=(int,input().split())

if (min(y,Y)-max(x,X))>0:
    print('No War')
    
else :
    print('War')

Fixed code:
N,M,X,Y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))

x.append(X)
y.append(Y)

if (min(y)-max(x))>0:
    print('No War')
    
else :
    print('War')
Buggy code:
N, M, X, Y = map(int, input().split())
xmax = max(map(int, input().split() + [X]))
ymin = min(map(int, input().split() + [Y]))

if xmax < ymin:
    print("No war")
else:
    print("war")

Fixed code:
N, M, X, Y = map(int, input().split())
xmax = max(map(int, input().split() + [X]))
ymin = min(map(int, input().split() + [Y]))
 
if xmax < ymin:
    print("No War")
else:
    print("War")
Buggy code:
n, m, X, Y =map(int,input().split())
x = list(map(int,input().split()))
y = list(map(int,input().split()))
A = max(X,max(x))
B = min(Y,min(y))
if A < B:
    print("No war")
else:
    print("War")
    

Fixed code:
n, m, X, Y =map(int,input().split())
x = list(map(int,input().split()))
y = list(map(int,input().split()))
A = max(X,max(x))
B = min(Y,min(y))
if A < B:
    print("No War")
else:
    print("War")
Buggy code:
#B - 1 Dimensional World's Tale(ABC110)
N,M,X,Y=map(int, input().split())
x=list(map(int, input().split()))
y=list(map(int, input().split()))
if X<Y and max(x)<Y and Y<=min(y):
    print("No War")
else:
    print("War")

Fixed code:
#B - 1 Dimensional World's Tale(ABC110)
N,M,X,Y=map(int, input().split())
x=list(map(int, input().split()))
y=list(map(int, input().split()))
if max(X,max(x))<min(Y,min(y)):
    print("No War")
else:
    print("War")
Buggy code:
N, M, X, Y = [int(i) for i in input().split()]
x = [int(i) for i in input().split()]
y = [int(i) for i in input().split()]
if max(x) < min(y):
  print("No War")
else:
  print("War")

Fixed code:
N, M, X, Y = [int(i) for i in input().split()]
x = [int(i) for i in input().split()]
y = [int(i) for i in input().split()]
x.append(X)
y.append(Y)
if max(x) < min(y):
  print("No War")
else:
  print("War")
Buggy code:
n,m,X,Y = input().split()
x = list(map(int,input().split()))
y = list(map(int,input().split()))
x.append(X)
y.append(Y)
if max(x)<min(y):
    print("No War")
else:
    print("War")

Fixed code:
n,m,X,Y = map(int,input().split())
x = list(map(int,input().split()))
y = list(map(int,input().split()))
x.append(X)
y.append(Y)
if max(x)<min(y):
    print("No War")
else:
    print("War")
Buggy code:
# coding: utf-8
# Your code here!
N,M,X,Y=[int(i) for i in input().split()]
x=[int(i) for i in input().split()]
y=[int(i) for i in input().split()]

x.sort()
y.sort()

#print(x,y)

if x[-1] <= y[0]:
    print("No War")
else:
    print("War")




Fixed code:
# coding: utf-8
# Your code here!
N,M,X,Y=[int(i) for i in input().split()]
x=[int(i) for i in input().split()]+[X]
y=[int(i) for i in input().split()]+[Y]

x.sort()
y.sort()

#print(x,y)

if x[-1] < y[0]:
    print("No War")
else:
    print("War")
Buggy code:

if __name__ == '__main__':
	n,m,x,y = map(int,input().split())
	X = list(map(int,input().split()))
	Y = list(map(int,input().split()))

	x_max = max(X)
	y_min = min(Y)

	for Z in range(x+1,y+1):
		if x_max < Z <= y_min:
			print("No war")
			break
	else:
		print("War")



Fixed code:
if __name__ == '__main__':
	n,m,X,Y = map(int,input().split())
	x = list(map(int,input().split()))
	y = list(map(int,input().split()))
 
	x_max = max(x)
	y_min = min(y)

	flg = False
	for Z in range(X+1,Y+1):
		if x_max < Z <= y_min:
			flg = True
			break

	if flg:
		print("No War")
	else:
		print("War")
Buggy code:
n,m,x,y = [int(i) for i in input().split()]

xl = [int(i) for i in input().split()]
yl = [int(i) for i in input().split()]

x_max = max(xl)
y_min = min(yl)
z = {i for i in range(x,y+1)}
x_y_interval = {i for i in range(x_max+1,y_min+1)} 


if y_min <= x_max:
    print('War')
elif list(z &x_y_interval):
    print('No war')
else:
    print('War')

Fixed code:
n,m,x,y = [int(i) for i in input().split()]

xl = [int(i) for i in input().split()]
yl = [int(i) for i in input().split()]

x_max = max(xl)
y_min = min(yl)
z = {i for i in range(x+1,y+1)}
x_y_interval = {i for i in range(x_max+1,y_min+1)} 


if not x_y_interval:
    print('War')
elif z &x_y_interval:
    print('No War')
else:
    print('War')
Buggy code:
N,M,X,Y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))

x.sort
y.sort

if x[-1] <= y[0] and X <= y[0] and x[-1] =< Y:
  print("No War")
else:
  print("War")
  
  

Fixed code:
N,M,X,Y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))

x=sorted(x)
y=sorted(y)

if x[-1] < y[0] and X < y[0] and x[-1] < Y:
  print("No War")
else:
  print("War")
Buggy code:
import sys

AN, BM, AX, BY = [int(x) for x in input().split()]
As = [int(x) for x in input().split()]
Bs = [int(x) for x in input().split()]

Z = BY

for loct in Bs:
    if loct < Z:
        Z = loct

for loct in As:
    if loct >= Z:
        print('War')
        sys.exit()

print('No War')


Fixed code:
import sys

AN, BM, AX, BY = [int(x) for x in input().split()]
As = [int(x) for x in input().split()]
Bs = [int(x) for x in input().split()]

Z = BY

for loct in Bs:
    if loct < Z:
        Z = loct
        if Z <= AX:
            print('War')
            sys.exit()

for loct in As:
    if loct >= Z:
        print('War')
        sys.exit()

print('No War')
Buggy code:
N, M, X, Y = map(int, input().split())
x = [int(_) for _ in input().split()]
y = [int(_) for _ in input().split()]

x_max = max(x)
y_min = min(y)

if (y_min-x_max > 0) and (Y-X > 0) and ((y_min>X) or (x_max<Y)):
    print("No War")
else:
    print("War")

Fixed code:
N, M, X, Y = map(int, input().split())
x = [int(_) for _ in input().split()]
y = [int(_) for _ in input().split()]

x_max = max(x)
y_min = min(y)

if (y_min-x_max > 0) and (Y-X > 0) and (X<y_min) and (x_max<Y):
    print("No War")
else:
    print("War")
Buggy code:
n,m,x,y = map(int, input().split())
x_city = sorted(list(map(int, input().split())))
y_city = sorted(list(map(int, input().split())))

if x_city[len(x_city)-1] < y_city[0]:
    print("No War")
else:
    print("War")


Fixed code:
n,m,x,y = map(int, input().split())
x_city = sorted(list(map(int, input().split())))
y_city = sorted(list(map(int, input().split())))

if x_city[len(x_city)-1] < y_city[0] and (x < y_city[0] <= y):
    print("No War")
else:
    print("War")
Buggy code:
N, M, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))

xmax = max(x)
ymin = min(y)
if xmax < ymin:
  print('No War')
else:
  print('War')


Fixed code:
N, M, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))

xmax = max(x)
ymin = min(y)
if (xmax<ymin) and (xmax<Y) and (X<ymin):
  print('No War')
else:
  print('War')
Buggy code:
N, M, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
max_x = max(x)
min_y = min(y)

if max_x <= min_y and (X <= max_x <= Y or X <= min_y <= Y ):
	print('No War')
else:
	print('War')

Fixed code:
N, M, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
max_x = max(max(x), X)
min_y = min(min(y), Y)

if max_x < min_y:
	print('No War')
else:
	print('War')
Buggy code:
n,m,x,y=map(int,input().split())
X=list(map(int,input().split()))
Y=list(map(int,input().split()))
X.sort()
Y.sort()
Z=[i for i in range(x+1,y)]
if X[-1]<Y[0]:
  z=[i for i in range(X[-1]+1,Y[0])]
  if len(set(z)&set(Z))>0:
    print("No War")
  else:
    print("War")
else:
  print("War")

Fixed code:
n,m,x,y=map(int,input().split())
X=list(map(int,input().split()))
Y=list(map(int,input().split()))
X.sort()
Y.sort()
Z=[i for i in range(x+1,y+1)]
if X[-1]<Y[0]:
  z=[i for i in range(X[-1]+1,Y[0]+1)]
  if len(set(z)&set(Z))>0:
    print("No War")
  else:
    print("War")
else:
  print("War")
Buggy code:
N,M,X,Y = map(int,input().split())
x_lis = list(map(int,input().split()))
y_lis = list(map(int,input().split()))

x_max = max(x_lis)
y_min = min(y_lis)

ans = "War"
for Z in range(X,Y+1):
  if x_max < Z <= y_min:
    ans = "No War"
    
print(ans)

Fixed code:
N,M,X,Y = map(int,input().split())
x_lis = list(map(int,input().split()))
y_lis = list(map(int,input().split()))

x_max = max(x_lis)
y_min = min(y_lis)

ans = "War"
for Z in range(X+1,Y+1):
  if x_max < Z <= y_min:
    ans = "No War"
    
print(ans)
Buggy code:
N,M,X,Y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
ans="War"
x.append(X)
y.append(Y)
if max(x)<min(y):
        ans="NO War"
print(ans)

Fixed code:
N,M,X,Y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
ans="War"
x.append(X)
y.append(Y)
if max(x)<min(y):
        ans="No War"
print(ans)
Buggy code:
MM = input().split()
N = int(MM[0])
M = int(MM[1])
X = int(MM[2])
Y = int(MM[3])
xx = input().split()
yy = input().split()
xxx =[]
yyy =[]
for i in xx:
  xxx.append(int(i))
for i in yy:
  yyy.append(int(i))
xxx.sort()
yyy.sort()
count =0
for i in range(X,Y+1):
  if xxx[-1] < i and yyy[0] >= i:
    count +=1
if count == 0:
  print('War')
else:
  print('No War')

Fixed code:
MM = input().split()
N = int(MM[0])
M = int(MM[1])
X = int(MM[2])
Y = int(MM[3])
xx = input().split()
yy = input().split()
xxx =[]
yyy =[]
for i in xx:
  xxx.append(int(i))
for i in yy:
  yyy.append(int(i))
xxx.sort()
yyy.sort()
count =0
for i in range(X+1,Y+1):
  if xxx[-1] < i and yyy[0] >= i:
    count +=1
    
if count == 0:
  print('War')
else:
  print('No War')
Buggy code:
x = list(map(int, input().split()))
n = [list(map(int, input().split())) for i in range(2)]
a = sorted(n[0], reverse=True)[0]
b = sorted(n[1])[0]
print(a)
print(b)
war = 0
for i in range(x[2]+1, x[3]):
  if (i > a) and (i <= b):
    war = 1
if war == 1:
  print('No War')
else:
  print('War')


Fixed code:
x = list(map(int, input().split()))
n = [list(map(int, input().split())) for i in range(2)]
a = sorted(n[0], reverse=True)[0]
b = sorted(n[1])[0]
war = 0
for i in range(x[2]+1, x[3]):
  if (i > a) and (i <= b):
    war = 1
if war == 1:
  print('No War')
else:
  print('War')
Buggy code:
n,m,x,y = [int(i) for i in input().split()]
xs = [int(i) for i in input().split()]
ys = [int(i) for i in input().split()]
if max(xs) < min(ys):
    print("No War")
else:
    print('War')

Fixed code:
n,m,x,y = [int(i) for i in input().split()]
xs = [int(i) for i in input().split()]
ys = [int(i) for i in input().split()]
if max(xs) < min(ys):
    if x < min(ys) <= y:
        print("No War")
    else:
        print("War")
else:
    print('War')
Buggy code:
N,M,X,Y = map(int,input().split())
x = list(map(int,input().split()))
y = list(map(int,input().split()))
max_X = max(X,max(x))
min_Y = min(Y,min(y))
if max_X<min_Y:
    print("War")
else:print("No war")


Fixed code:
N,M,X,Y = map(int,input().split())
x = list(map(int,input().split()))
y = list(map(int,input().split()))
max_X = max(X,max(x))
min_Y = min(Y,min(y))

if max_X<min_Y:
    print("No War")
else:print("War")
Buggy code:
N,M,X,Y=map(int,input().split(' '))
x_list=list(map(int,input().split(' ')))
y_list=list(map(int,input().split(' ')))
x_max=max(x_list)
y_min=min(y_list)

if((X+1) < Y and (x_max+1) < y_min):
    print("No War")
else:
    print("War")
    

Fixed code:
N,M,X,Y=map(int,input().split(' '))
x_list=list(map(int,input().split(' ')))
y_list=list(map(int,input().split(' ')))
x_list.append(X)
y_list.append(Y)
x_max=max(x_list)
y_min=min(y_list)

if(X < Y and x_max < y_min):
    print("No War")
else:
    print("War")
Buggy code:
n,m,X,Y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
x.append(X)
y.append(Y)
if max(x)<=min(y):
    print("No War")
else:
    print("War")

Fixed code:
n,m,X,Y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
x.append(X)
y.append(Y)
if max(x)<min(y):
    print("No War")
else:
    print("War")
Buggy code:
ni = lambda: int(input())
nl = lambda: list(map(int, input().split()))
nm = lambda: map(int, input().split())

n, m, x, y = nm()
xmax = max(nl())
ymin = min(nl())

if xmax < ymin:
    print('No War')
else:
    print('War')


Fixed code:
ni = lambda: int(input())
nl = lambda: list(map(int, input().split()))
nm = lambda: map(int, input().split())

n, m, x, y = nm()
xmax = max(nl()+[x])
ymin = min(nl()+[y])

if xmax < ymin:
    print('No War')
else:
    print('War')
Buggy code:
N, M , X , Y = map(int, input().split())
xs = list(map(int, input().split()))
ys = list(map(int, input().split()))
if min(ys) <= max(xs):
    print('War')
else:
    print('No War')

Fixed code:
N, M , X , Y = map(int, input().split())
xs = list(map(int, input().split()))
ys = list(map(int, input().split()))
xs.append(X)
ys.append(Y)
if min(ys) <= max(xs):
    print('War')
else:
    print('No War')
Buggy code:
n, m, x, y = map(int, input().split())
lx = list(map(int, input().split()))
ly = list(map(int, input().split()))
if (max(lx+[x]) < min(ly+[y])):
    print("No war")
else:
    print("War")

Fixed code:
n, m, x, y = map(int, input().split())
lx = list(map(int, input().split()))
ly = list(map(int, input().split()))
if (max(lx+[x]) < min(ly+[y])):
    print("No War")
else:
    print("War")
Buggy code:
def main():
    data = list(map(int, input().split()))
    Xn = data[0]
    Yn = data[1]
    X = data[2]
    Y = data[3]

    Xs = list(map(int, input().split()))
    Ys = list(map(int, input().split()))

    mergin = list(range(X, Y))
    flag = false
    if not mergin:
        mergin.append(0)
        flag = true
    x_line = min(mergin)
    y_line = max(mergin)

    max_x = max(Xs)
    min_y = min(Ys)

    if (max_x < min_y):
        if ((max_x + min_y) // 2 in mergin):
            if flag:
                print('War')
            else:
                print('No War')
        else:
            if flag:
                print('No War')
            else:
                print('War')
    else:
        if flag:
            print('No War')
        else:
            print('War')

if __name__ == "__main__":
    main()


Fixed code:
def main():
    data = list(map(int, input().split()))
    Xn = data[0]
    Yn = data[1]
    X = data[2]
    Y = data[3]

    Xs = list(map(int, input().split()))
    Ys = list(map(int, input().split()))

    mergin = list(range(X, Y))
    if not mergin:
        mergin.append(0)
    x_line = min(mergin)
    y_line = max(mergin)

    max_x = max(Xs)
    min_y = min(Ys)

    if (max_x < min_y):
        if ((max_x + min_y) // 2 in mergin):
            print('No War')
        else:
            print('War')
    else:
        print('War')

if __name__ == "__main__":
    main()
Buggy code:
n, m, x, y = list(map(int, input().split()))
xs = list(map(int, input().split()))
ys = list(map(int, input().split()))

xs_max = max(xs)
ys_min = min(ys)
flag = True
for xi in range(xs+1, ys_min):
  if x<xi and xi<=y:
    print('No War')
    flag = False
    break
if flag:
  print('War')


Fixed code:
n, m, x, y = list(map(int, input().split()))
xs = list(map(int, input().split()))
ys = list(map(int, input().split()))

xs_max = max(xs)
ys_min = min(ys)
#print(xs_max, ys_min)
flag = True
for xi in range(xs_max+1, ys_min+1):
  #print(xi)
  if x<xi and xi<=y:
    print('No War')
    flag = False
    break
if flag:
  print('War')
Buggy code:
n,m,x,y = map(int,input().split())
a = max(list(map(int,input().split())))
b = max(list(map(int,input().split())))
ans = "War"
for i in range(x+1,y):
    if i>a and i<=b:
        ans = "No War"
print(ans)

Fixed code:
n,m,x,y = map(int,input().split())
a = max(list(map(int,input().split())))
b = min(list(map(int,input().split())))
ans = "War"
for i in range(x+1,y):
    if i>a and i<=b:
        ans = "No War"
print(ans)
Buggy code:
n, m, x, y = map(int, input().split())
xs = max(list(map(int, input().split())).append(x))
ys = max(list(map(int, input().split())).append(y))
print('No War' if xs < ys else 'War')

Fixed code:
n, m, x, y = map(int, input().split())
xs = list(map(int, input().split()))
ys = list(map(int, input().split()))
xs.append(x)
ys.append(y)
print('No War' if max(xs) < min(ys) else 'War')
Buggy code:
n,m,x,y=map(int,input().split())
X=list(map(int,input().split()))
Y=list(map(int,input().split()))
if max(X)<min(Y):
  print('No War')
else:
  print('War')

Fixed code:
n,m,x,y=map(int,input().split())
X=list(map(int,input().split()))
Y=list(map(int,input().split()))
if x<min(Y)<=y and max(X)<min(Y):
  print('No War')
else:
  print('War')
Buggy code:
n,m,x,y = map(int,input().split())
a = list( map(int,input().split()) )
b = list( map(int,input().split()) )

ck = 0
for z in range(x,y+1):
  for i in a:
    if i >= z:
      break
  else:
    for i in b:
      if i < z:
        break
    else:
      ck = 1
      break

print('No War' if ck else 'War')

Fixed code:
n,m,x,y = map(int,input().split())
a = list( map(int,input().split()) )
b = list( map(int,input().split()) )

ck = 0
ans = 0
for z in range(x+1,y+1):
  for i in a:
    if not i < z:
      break 
  else:
    for i in b:
      if not i >= z:
        break
    else:
      ck = 1
      ans = z
      break

print('No War' if ck else 'War')
Buggy code:
n,m,x,y = map(int,input().split())
d = "war"
l_x = sorted(list(map(int,input().split())))[::-1]
l_y = sorted(list(map(int,input().split())))
for i in range(x,y+1):
  if l_x[0]<=i and l_y[0]>=i:
    d = "No War"
    break
print(d)


Fixed code:
n,m,x,y = map(int,input().split())
d = "War"
l_x = sorted(list(map(int,input().split())))[::-1]
l_y = sorted(list(map(int,input().split())))
for i in range(x+1,y+1):
  if l_x[0]<i and l_y[0]>=i:
    d = "No War"
    break
print(d)
Buggy code:
N, M, X, Y = map(int,input().split())
Xl = list(map(int,input().split()))
Yl = list(map(int,input().split()))

if max(Xl) < min(Yl) and (max(Xl) < Y or min(Yl) > X):
    print("No War")
else:
    print("War")


Fixed code:
N, M, X, Y = map(int,input().split())
Xl = list(map(int,input().split()))
Yl = list(map(int,input().split()))

if max(Xl) < min(Yl) and max(Xl) < Y and min(Yl) > X:
    print("No War")
else:
    print("War")
Buggy code:
n,m,x,y = map(int,input().split())
xi = list(map(int,input().split()))
yi=  list(map(int,input().split()))
if x<y and max(xi)<min(yi):
    print('No War')
else:
    print('War')

Fixed code:
n,m,x,y = map(int,input().split())
xi = list(map(int,input().split()))
xi.append(x)
yi=  list(map(int,input().split()))
yi.append(y)
if  max(xi)<min(yi):
    print('No War')
else:
    print('War')
Buggy code:
n,m,x,y=map(int,input().split())
p=list(map(int,input().split()))
q=list(map(int,input().split()))
if y-x>=1:
  kouho=[t for t in range(y+1)][x+1:]
  p.sort()
  q.sort()
  c=0
  for i in range(0,len(kouho)-1):
    c+=1
    if p[n-1]<kouho[i]<=q[0]:
      print("No War")
      break
    if c==len(kouho):
      print("War")
else:
  print("War")

Fixed code:
n,m,x,y=map(int,input().split())
p=list(map(int,input().split()))
q=list(map(int,input().split()))
if y-x>=1:
  kouho=[]
  for k in range(x+1,y+1):
    kouho.append(k)
  p.sort()
  q.sort()
  c=0
  for i in range(0,len(kouho)):
    c+=1
    if p[-1]<kouho[i]<=q[0]:
      print("No War")
      break
    if c==len(kouho):
      print("War")
else:
  print("War")