ZhenlongDai/ACPR huggingface dataset:
Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m, X, Y = map(int, input().split())
xlist = list(map(int, input().split()))
ylist = list(map(int, input().split()))
xlist.sort()
ylist.sort()

if xlist[-1] < ylist[0]:
   for i in range(xlist[-1]+1, ylist[0]+1):
      if X < i and i < Y:
          print("No War")
          break
else:
   print("War")


Failing test case input:
5 5 6 8
-1 0 1 5 -264
101 6 26

Expected output:
War


Actual output:

Fixed submission (verdict: Accepted):
n, m, X, Y = map(int, input().split())
xlist = list(map(int, input().split()))
ylist = list(map(int, input().split()))
xlist.append(X)
ylist.append(Y)
xlist.sort()
ylist.sort()
xlist.reverse()

if xlist[0] < ylist[0]:
   print("No War")
else:
   print("War")

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M, X, Y = map(int, input().split(' '))
x = list(map(int, input().split(' '))) + [X]
y = list(map(int, input().split(' '))) + [Y]

if max(x) < min(y):
    print('No war')
else:
    print('War')

Failing test case input:
3 2 10 40
8 11 15
16 22

Expected output:
No War


Actual output:
No war


Fixed submission (verdict: Accepted):
N, M, X, Y = map(int, input().split(' '))
x = list(map(int, input().split(' '))) + [X]
y = list(map(int, input().split(' '))) + [Y]

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

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,x,y=map(int,input().split())
xi=[int(_) for _ in input().split()]
yi=[int(_) for _ in input().split()]
print('War' if max(xi) >= min(yi) else 'No War')

Failing test case input:
5 5 6 0
-1 0 1 5 -76
101 6 14

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
n,m,x,y=map(int,input().split())
xi=[int(_) for _ in input().split()]
yi=[int(_) for _ in input().split()]
print('War' if max(xi) >= min(yi) or x >= y  or max(xi) >= y or min(yi) <= x else 'No War')

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def resolve():
    N, M, X, Y = map(int, input().split())
    x = list(map(int, input().split()))
    y = list(map(int, input().split()))
    ans = 0
    for z in range(X+1, Y+1):
        if max(x)<=z and z<=min(y):
            ans += 1
    print("No War" if ans != 0 else "War")
resolve()

Failing test case input:
3 2 10 40
8 11 9
16 11

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
def resolve():
    N, M, X, Y = map(int, input().split())
    x = list(map(int, input().split()))
    y = list(map(int, input().split()))
    ans = 0
    for z in range(X+1, Y+1):
        if max(x)<z and z<=min(y):
            ans += 1
    print("No War" if ans != 0 else "War")
resolve()
Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)


Failing test case input:
4 2 -84 -1
-35 -4 -35 -150
-22 75

Expected output:
War


Actual output:
war


Fixed submission (verdict: Accepted):
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)

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M,X,Y = map(int,input().split())
x = list(map(int,input().split()))
y = list(map(int,input().split()))
if X>=Y:
    print("War")
    exit()
for Z in range(X,Y):
    if max(x)<=Z<min(y):
        continue
    else:
        print("War")
        exit()
print("No War")


Failing test case input:
3 2 10 20
8 15 15
16 22

Expected output:
No War


Actual output:
War


Fixed submission (verdict: Accepted):
N,M,X,Y = map(int,input().split())
x = list(map(int,input().split()))
y = list(map(int,input().split()))
if X>=Y:
    print("War")
    exit()
for Z in range(X,Y):
    if max(x)<=Z<min(y):
        print("No War")
        exit()
print("War")

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = list(map(int,input().split()))
z = "War"

for i in range(a[2],a[3]+1):
  if max(b)<i<=min(c):
    z = "No War"
else:
  print(z)
    

Failing test case input:
5 5 6 8
-1 0 1 5 -264
101 6 26

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
a = list(map(int,input().split()))
x = list(map(int,input().split()))
y = list(map(int,input().split()))
z = "War"

for i in range(a[2]+1,a[3]+1):
  if max(x)<i<=min(y):
    z = "No War"
else:
  print(z)

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,x,y=map(int,input().split())
xlist=[int(i) for i in input().split()]
ylist=[int(i) for i in input().split()]

if x<y and xlist<ylist:
    print("No War")
else:
    print("War")

Failing test case input:
5 5 6 8
-1 0 1 5 -138
111 6 2

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
n,m,x,y=map(int,input().split())
xlist=[int(i) for i in input().split()]
ylist=[int(i) for i in input().split()]
xlist.append(x)
ylist.append(y)

if x<y and max(xlist)<min(ylist):
    print("No War")
else:
    print("War")
Problem: p03251
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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[n - 1] < y[0] and X <= y[0] and x[n - 1] <= Y:
    print("No War")
else:
    print("War")


Failing test case input:
5 3 6 8
-10 3 1 5 -100
101 6 14

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
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)
x.sort()
y.sort()
if x[-1] < y[0]:
    print("No War")
else:
    print("War")

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M,X,Y = map(int, input().split())
x = [int(i) for i in input().split()]
y = [int(j) for j in input().split()]
a = list(range(X,Y+1))
b = list(range(max(x),min(y)+1))
if list (set(a)&set(b))!=[]:
    print('No War')
else :
    print('War')

Failing test case input:
5 5 6 8
-1 0 1 5 -76
101 6 14

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
N,M,X,Y = map(int, input().split())
x = [int(i) for i in input().split()]
y = [int(j) for j in input().split()]
a = list(range(X+1,Y+1))
b = list(range(max(x)+1,min(y)+1))
if list (set(a)&set(b))!=[]:
    print('No War')
else :
    print('War')

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,x,y=list(map(int,input().split()))
l_x=list(map(int,input().split()))
l_y=list(map(int,input().split()))
x_max=sorted(l_x,reverse=True)[0]
y_min=sorted(l_y)[0]
if x_max>=y_min:
    print('War')
    exit()
for i in range(x_max+1,y_min,1):
    if x<i<=y:
        print('No War')
        exit()
print('War')


Failing test case input:
3 3 10 40
8 1 15
16 23

Expected output:
No War


Actual output:
War


Fixed submission (verdict: Accepted):
n,m,x,y=list(map(int,input().split()))
l_x=list(map(int,input().split()))
l_y=list(map(int,input().split()))
x_max=max(l_x)
y_min=min(l_y)
for i in range(x_max+1,y_min+1):
    if x<i<=y:
        print('No War')
        exit()
print('War')

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

N, M, X, Y = map(int, input().split())
x = map(int, input().split())
y = map(int, input().split())

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

flag_war = True

for z in range(X+1, Y):
    if x_max < z:
        if y_min >= z:
            print('No War')
            print(z)
            flag_war = False
        else:
            continue
    else:
        continue
if flag_war == True:
    print('War')


Failing test case input:
0 2 10 40
8 15 15
16 22

Expected output:
No War


Actual output:
No War
16


Fixed submission (verdict: Accepted):


N, M, X, Y = map(int, input().split())
x = map(int, input().split())
y = map(int, input().split())

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

flag_war = True

for z in range(X+1, Y+1):
    if x_max < z:
        if y_min >= z:
            print('No War')
            flag_war = False
            break
        else:
            continue
    else:
        continue
if flag_war == True:
    print('War')
Problem: p03251
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,m,a,b = 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]:
    for i in range(x[-1]+1,y[0]+1):
        if a<i<b:
            print("No War")
    else:
        print("War")
else:
    print("War")

Failing test case input:
3 1 10 40
8 1 15
16 23

Expected output:
No War


Actual output:
No War
War


Fixed submission (verdict: Accepted):
n,m,a,b = 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]:
    for i in range(x[-1]+1,y[0]+1):
        if a<i<b:
            print("No War")
            break
    else:
        print("War")
else:
    print("War")

Problem: p03251
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):

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

x = list(map(int, input().split()))
y = list(map(int, input().split()))

x.sort()
y.sort()

def is_war(x, y, N, M):
    if x[N-1] > y[0]:
        return False
    elif x[N-1] >= Y:
        return False
    elif y[0] <= X:
        return False
    else:
        return True

if is_war(x, y, N, M):
    print("No War")
else:
    print("War")

Failing test case input:
3 2 10 40
8 11 9
16 11

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
N, M, X, Y = map(int, input().split())

x = list(map(int, input().split()))
y = list(map(int, input().split()))

x.sort()
y.sort()

def is_war(x, y, N, M):
    if x[N-1] >= y[0]:
        return False
    elif x[N-1] >= Y:
        return False
    elif y[0] <= X:
        return False
    else:
        return True

if is_war(x, y, N, M):
    print("No War")
else:
    print("War")

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
LL = input().split(" ")

LX = list(map(int,input().split()))
LY = list(map(int,input().split()))
	
LX.sort(reverse = True)
LY.sort(reverse = True)

CO = 0

for R in range(int(LL[2])+1,int(LL[3])):
	if LX[0]  >= LY[0]:
		break
	elif LX[0] <= R and R <= LY[0] :
		print("No War")
		CO = 1
		break
		
if CO == 0:
	print("War")

Failing test case input:
5 2 6 8
-1 0 1 5 -100
101 0 14

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
LL = input().split(" ")

LX = list(map(int,input().split()))
LY = list(map(int,input().split()))
	
LX.sort(reverse = True)
LY.sort()

CO = 0

for R in range(int(LL[2])+1,int(LL[3])):
	if LX[0]  >= LY[0]:
		break
	elif LX[0] <= R  <= LY[0] :
		print("No War")
		CO = 1
		break
		
if CO == 0:
	print("War")
Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M, X, Y = map(int, input().split())
x_list = list(map(int, input().split()))
y_list = list(map(int, input().split()))

for Z in range(X, Y+1):
  if max(x_list) < Z <= min(y_list):
    print('No War')
    exit()

print('War')

Failing test case input:
5 3 6 8
-10 4 1 5 -100
101 6 14

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
N, M, X, Y = map(int, input().split())
x_list = list(map(int, input().split()))
x_list.append(X)
y_list = list(map(int, input().split()))
y_list.append(Y)

if max(x_list) < min(y_list):
  print('No War')
else:
  print('War')

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,x,y=map(int,input().split())
xn=list(map(int,input().split()))
ym=list(map(int,input().split()))
xn.append(x)
ym.append(y)
if max(xn)<max(ym):
  print("No War")
else:
  print("War")

Failing test case input:
5 5 6 8
-1 -1 1 5 -190
101 6 2

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
n,m,x,y=map(int,input().split())
xn=list(map(int,input().split()))
ym=list(map(int,input().split()))
xn.append(x)
ym.append(y)
if max(xn)<min(ym):
  print("No War")
else:
  print("War")

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,x,y = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))

a.sort(),b.sort()

if a[-1] < b[0]:
    print("No War")
else:
    print("War")

Failing test case input:
5 5 6 8
-1 0 1 5 -138
101 6 26

Expected output:
War


Actual output:
No War


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

a.sort(),b.sort()

if max(a[-1],x) < min(y,b[0]):
    print("No War")
else:
    print("War")

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M, X, Y = map(int,input().split())
x = [int(x) for x in input().split()]
y = [int(y) for y in input().split()]
x.append(X)
y.append(Y)
x_max = max(x)
y_min = min(y)
if x_max + 1 < y_min:
    print('No War')
else:
    print('War')

Failing test case input:
3 2 10 40
8 15 15
16 22

Expected output:
No War


Actual output:
War


Fixed submission (verdict: Accepted):
N, M, X, Y = map(int,input().split())
x = [int(x) for x in input().split()]
y = [int(y) for y in input().split()]
x.append(X)
y.append(Y)
x_max = max(x)
y_min = min(y)
if x_max < y_min:
    print('No War')
else:
    print('War')
Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


N,M,X,Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
x.sort()
x.reverse()
y.sort()

if x[0] > y[0]:
    print("War")
else:
    print("No War")


Failing test case input:
5 5 8 8
-1 0 1 5 -264
101 6 26

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):


N,M,X,Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
x.sort()
x.reverse()
y.sort()

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

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M,X,Y = map(int,input().split())

x = [int(i) for i in input().split()]
y = [int(i) for i in input().split()]

c=0
for i in range(X+1,Y+1):
  c =0
  if (i >=X and i <=Y) :
    c += 1
  if max(x) <= i :
    c += 1
  if min(y) >= i :
    c += 1
  
  if c == 3:
    print(i)
    print("No War")
    exit()
  else:
    continue
    
    
print("War")




Failing test case input:
0 2 10 40
8 15 15
16 22

Expected output:
No War


Actual output:
15
No War


Fixed submission (verdict: Accepted):
N,M,X,Y = map(int,input().split())

x = [int(i) for i in input().split()]
y = [int(i) for i in input().split()]

c=0
for i in range(X+1,Y+1):
  c =0
  if (i >X and i <=Y) :
    c += 1
  if max(x) < i :
    c += 1
  if min(y) >= i :
    c += 1
  
  if c == 3:
   
    print("No War")
    exit()
  else:
    continue
    
    
print("War")

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M, X, Y = list(map(int, input().split()))
X = list(map(int, input().split()))
Y = list(map(int, input().split()))

try:
    Z = range(max(X), min(Y))
    if max(X) <= min(Z) and max(Z) <= min(Y):
        print("No War")
    else:
        print("War")
except ValueError:
    print("War")


Failing test case input:
5 3 6 8
-10 4 0 5 -100
101 6 14

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
N, M, X, Y = list(map(int, input().split()))
X_list = list(map(int, input().split()))
Y_list = list(map(int, input().split()))

for Z in range(X + 1, Y + 1):
    if max(X_list) < Z and Z <= min(Y_list):
        print("No War")
        exit()

print("War")
Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M, X, Y = map(int, input().split())
list_x = list(map(int,input().split(' ')))
list_y = list(map(int,input().split(' ')))


min_range = max(list_x)
max_range = min(list_y)

ans = 0

for i in range(X+1, Y):
  if(i > min_range and i <= max_range):
    ans = 1

if (ans == 1):
  print("No war")
elif (ans == 0):
  print("War")


Failing test case input:
0 0 10 40
12 1 15
16 70

Expected output:
No War


Actual output:
No war


Fixed submission (verdict: Accepted):
N, M, X, Y = map(int, input().split())
list_x = list(map(int,input().split(' ')))
list_y = list(map(int,input().split(' ')))
 
 
min_range = max(list_x)
max_range = min(list_y)
 
ans = 0
 
for i in range(X+1, Y+1):
  if(i > min_range and i <= max_range):
    ans = 1
 
if (ans == 1):
  print("No War")
elif (ans == 0):
  print("War")

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M, X, Y = map(int, input().split())
list_x = [int(i) for i in input().split()]
list_y = [int(j) for j in input().split()]
if X >= Y:
    print("War")
else:
    if max(list_x) +1 >= min(list_y):
        print("War")
    else:
        print("No War")


Failing test case input:
3 1 10 40
8 1 15
16 23

Expected output:
No War


Actual output:
War


Fixed submission (verdict: Accepted):
N, M, X, Y = map(int, input().split())
list_x = [int(i) for i in input().split()]
list_y = [int(j) for j in input().split()]
if max(list_x) >= min(list_y):
    print('War')
else:
    if X < max(list_x) + 1 <= Y:
        print('No War')
    else:
        print('War')

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')

Failing test case input:
5 5 6 0
-1 0 1 5 -76
101 6 14

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
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')

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m, x, y = map(int, input().split())
x_li = list(map(int, input().split()))
y_li = list(map(int, input().split()))
if max(x_li) < min(y_li):
    print("No War")
else:
    print("War")

Failing test case input:
5 3 6 8
-1 0 2 5 -100
101 6 14

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
n,m,x,y=map(int,input().split())
xl=list(map(int,input().split()))
yl=list(map(int,input().split()))
 
xl.append(x)
yl.append(y)
if max(xl) < min(yl) and x < y:
    print('No War')
else:
    print('War')
Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,x,y = map(int,input().split())

x_n = list(map(int,input().split()))
y_m = list(map(int,input().split()))

if x+1 < y and max(x_n)+1 < min(y_m): 
    print("No War")
else:
    print("War")


Failing test case input:
3 1 10 40
8 1 15
16 23

Expected output:
No War


Actual output:
War


Fixed submission (verdict: Accepted):
n,m,x,y = map(int,input().split())

x_n = list(map(int,input().split()))
y_m = list(map(int,input().split()))

if x < max(x_n) and max(x_n) <min(y_m) and min(y_m) <=y:
    print("No War")
else:
    print("War")

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m, x, y = map(int, input().split())
if x>y :
    print('War')
else:
    X = sorted(list(map(int, input().split())))
    Y = sorted(list(map(int, input().split())))
    for i in range(x+1, y+1):
        if X[-1]<i and i <= Y[0] and x < i and i <= y:
            print('No War')
            break
        else :
            print('War')
            break



Failing test case input:
5 5 8 8
-1 0 1 5 -264
101 6 26

Expected output:
War


Actual output:

Fixed submission (verdict: Accepted):
n, m, x, y = map(int, input().split())
if x>y :
    print('War')
else  :
    X = sorted(list(map(int, input().split())))
    Y = sorted(list(map(int, input().split())))
    a = 0
    for i in range(x+1, y+1):
        if X[-1]<i and i <= Y[0] and x < i and i <= y:
            print('No War')
            break
        else :
            a += 1
    if a == y-x:
        print('War')

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)
print('No War' if max_X<min_Y else 'War')

Failing test case input:
5 3 6 8
-1 0 1 5 -100
101 6 14

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
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)
print('No War' if max_X<min_Y and max_X<y and x<min_Y else 'War')

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
for z in range(X+1, Y):
    if max(x) < z < min(y):
        print("No War")
        exit()
print("War")

Failing test case input:
3 3 10 40
8 1 15
16 23

Expected output:
No War


Actual output:
War


Fixed submission (verdict: Accepted):
n, m, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
for z in range(X+1, Y):
    if max(x) < z <= min(y):
        print("No War")
        exit()
print("War")
Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M,X,Y = map(int,input().split())
x = list(map(int,input().split()))
y = list(map(int,input().split()))

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


Failing test case input:
3 2 10 40
8 11 9
16 11

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
N,M,X,Y = map(int,input().split())
x = list(map(int,input().split()))
y = list(map(int,input().split()))
print ("No War") if max(x) < min(y) and (X < max(x) < Y or X < min(y) <= Y) else print ("War")

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,x,y=map(int,input().split())
lx=list(map(int,input().split()))
ly=list(map(int,input().split()))
lx.sort()
ly.sort()
if lx[-1]>ly[0]:
    print('War')
for i in range(lx[-1]+1,ly[0]+1):
    if x<i<=y:
        print("No War")
        break
    else:
        print('War')

Failing test case input:
3 2 10 40
8 11 9
16 11

Expected output:
War


Actual output:

Fixed submission (verdict: Accepted):
n,m,x,y=map(int,input().split())
lx=list(map(int,input().split()))
ly=list(map(int,input().split()))
lx.sort()
ly.sort()
if lx[-1]>=ly[0]:
    print('War')
for i in range(lx[-1]+1,ly[0]+1):
    if x<i<=y:
        print("No War")
        break
    else:
        print('War')

Problem: p03251
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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)

for i in range(xmax,ymin+1):
    if X<i<Y:
        print("No War")
        exit()
    
print("War")

Failing test case input:
3 2 10 40
8 11 9
16 11

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
N,M,X,Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
if (X < Y)&(max(x) < min(y))&(max(x) < Y)&(X < min(y)):
    print("No War")
else:
    print("War")

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
n,m,x,y=map(int,input().split())
listx=list(map(int,input().split()))
listy=list(map(int,input().split()))
listx.sort(reverse=True)
listy.sort()
for i in range(x,y):
    if listx[0]<i<=listy[0]:
        print('No War')
        sys.exit()
print('War')

Failing test case input:
5 5 6 8
-1 0 1 5 -76
101 6 26

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
import sys
n,m,x,y=map(int,input().split())
listx=list(map(int,input().split()))
listy=list(map(int,input().split()))
listx.sort(reverse=True)
listy.sort()
for i in range(x+1,y+1):
    if listx[0]<i<=listy[0]:
        print('No War')
        sys.exit()
print('War')
Problem: p03251
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N, M, X, Y = map(int,input().split())
x1 = map(int,input().split())
x2 = map(int,input().split())

x1_max = max(x1)
x2_min = min(x2)

if x1_max <= x2_min and X <= Y and x2_min > X and x1_max < Y:   
    print("No War")
else:
    print("War")

Failing test case input:
3 2 10 40
8 11 9
16 11

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
N, M, X, Y = map(int,input().split())
x1 = map(int,input().split())
x2 = map(int,input().split())

if max(X,max(x1)) < min(Y,min(x2)):   
    print("No War")
else:
    print("War")

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    n, m, x, y = list(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)

    zx = max(x_list) + 1
    zy = min(y_list)

    if zx > zy :
        print('War')

    print('No war')


if __name__ == '__main__':
    main()



Failing test case input:
4 2 -55 -1
-20 -7 -35 -77
-22 75

Expected output:
War


Actual output:
War
No war


Fixed submission (verdict: Accepted):
def main():
    n, m, x, y = list(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)

    zx = max(x_list) + 1
    zy = min(y_list)

    if zx > zy :
        print('War')
    else:
        print('No War')


if __name__ == '__main__':
    main()

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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 y_min <= x_max:
    print('War')
elif list(z &x_y_interval):
    print('No war')
else:
    print('War')

Failing test case input:
3 2 10 20
8 15 12
16 22

Expected output:
No War


Actual output:
No war


Fixed submission (verdict: Accepted):
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')

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(map(int,input().split()))
x = list(map(int,input().split()))
y = list(map(int,input().split()))
z = "War"

for i in range(a[2],a[3]+1):
  if max(x)<i<min(y):
    z = "No War"
else:
  print(z)

Failing test case input:
0 0 10 40
12 1 15
16 23

Expected output:
No War


Actual output:
War


Fixed submission (verdict: Accepted):
a = list(map(int,input().split()))
x = list(map(int,input().split()))
y = list(map(int,input().split()))
z = "War"

for i in range(a[2]+1,a[3]+1):
  if max(x)<i<=min(y):
    z = "No War"
else:
  print(z)
Problem: p03251
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,m,X,Y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
if min(y)<X:
  print("War")
elif Y<max(x):
  print("War")
else:
  if max(x)>min(y):
    print("War")
  else:
    print("No War")

Failing test case input:
3 2 10 40
8 11 9
16 11

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
n,m,X,Y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
if min(y)<=X:
  print("War")
elif Y<=max(x):
  print("War")
else:
  if max(x)>=min(y):
    print("War")
  else:
    print("No War")

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,x,y = map(int,input().split())
x_list = list(map(int,input().split()))
y_list = list(map(int,input().split()))
if max(x_list) <= min(y_list) and x <min(y_list) and y > max(x_list):
    print('No War')
else:
    print('War')

Failing test case input:
3 2 10 40
8 11 9
16 11

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
n,m,x,y = map(int,input().split())
x_list = list(map(int,input().split()))
x_list.append(x)
y_list = list(map(int,input().split()))
y_list.append(y)
if max(x_list) < min(y_list):
    print('No War')
else:
    print('War')

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))

bool = False
for i in range(x[-1]+1, y[0]+1):
    if X < i <= Y:
        bool = True
        break
        
print('No War' if bool else 'War')

Failing test case input:
4 2 -48 -2
-20 -35 -35 -23
-22 75

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
N, M, X, Y = map(int, input().split())
x = sorted(map(int, input().split()))
y = sorted(map(int, input().split()))
 
if x[-1] < y[0]:
  if Y <= x[-1] or y[0] <= X:
    print('War')
  else:
    print('No War')
else:
  print('War')

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,a,b=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")

Failing test case input:
5 5 6 8
-1 0 1 5 -100
101 6 14

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
n,m,a,b=map(int, input().split())
x=list(map(int, input().split()))
y=list(map(int, input().split()))
j=False
for i in range(a+1,b+1):
    if max(x)<i and min(y)>=i:
        j=True

print("No War" if j else "War")
Problem: p03251
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,m,x,y = map(int,input().split())

lsx = list(map(int,input().split()))
lsy = list(map(int,input().split()))

if min(lsy) - max(lsx) > 0:
    print("War")
else:
    print("No war")


Failing test case input:
4 2 -48 -1
-20 -35 -91 -23
-22 75

Expected output:
War


Actual output:
No war


Fixed submission (verdict: Accepted):
n,m,x,y = map(int,input().split())

lsx = list(map(int,input().split()))
lsx.append(x)
lsy = list(map(int,input().split()))
lsy.append(y)

if min(lsy) - max(lsx) > 0:
    print("No War")
else:
    print("War")

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,x,y=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=max(a);d=min(b)
if c>d:print('War')
elif c==d:
  if x<c and c<=y:print('No War')
  else:print('War')
else:
  if c>=y or d<=x:print('War')
  else:print('No War')

Failing test case input:
3 2 10 40
8 11 9
16 11

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
n,m,x,y=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=max(a);d=min(b)
if c>=d:print('War')
else:
  if c>=y or d<=x:print('War')
  else:print('No War')

Problem: p03251
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n, m, x, y = map(int, input().split())
xx = list(map(int, input().split()))
yy = list(map(int, input().split()))
print([x]+xx)
xxx = max(xx + [x])
yyy = min(yy + [y])
if xxx < yyy:
    print("No War")
else:
    print("War")


Failing test case input:
5 5 6 8
-1 -1 1 5 -190
101 6 2

Expected output:
War


Actual output:
[6, -1, -1, 1, 5, -190]
War


Fixed submission (verdict: Accepted):
n, m, x, y = map(int, input().split())
xx = list(map(int, input().split()))
yy = list(map(int, input().split()))
xxx = max(xx + [x])
yyy = min(yy + [y])
if xxx < yyy:
    print("No War")
else:
    print("War")

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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

xi = list(map(int, input().split()))

yi = list(map(int, input().split()))

if len(list(set(xi) & set(yi))) >= 1:
    print('War')
else:
    print('No War')

Failing test case input:
4 2 -48 -1
-20 -35 -91 -23
-22 75

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):

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

xi = list(map(int, input().split()))

yi = list(map(int, input().split()))

xi.append(X)
yi.append(Y)

if max(xi) < min(yi):
    print('No War')
else:
    print('War')
Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m, x, y = map(int, input().split())
xlist = list(map(int, input().split()))
ylist = list(map(int, input().split()))
max_x = max(xlist)
min_y = min(ylist)
flg = 0
for i in range(max_x, min_y+1):
    if i>x and i<=y:
        flg=1
        break
if flg ==1:
    print("No War")
else:
    print("War")

Failing test case input:
3 2 10 40
8 11 9
16 11

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
n, m, x, y = map(int, input().split())
xlist = list(map(int, input().split()))
ylist = list(map(int, input().split()))
max_x = max(xlist)
min_y = min(ylist)
flg = 0
for i in range(max_x+1, min_y+1):
    if i>x and i<=y:
        flg=1
        break
if flg ==1:
    print("No War")
else:
    print("War")

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M,X,Y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))

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


Failing test case input:
3 2 10 20
8 15 15
16 22

Expected output:
No War


Actual output:
War


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

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

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
flg = 'War'
for i in range(X, Y+1):
	if max(x) < i and i <= min(y):
		flg = 'No ' + flg
		break
print(flg)

Failing test case input:
5 3 6 8
-10 4 0 5 -100
101 6 14

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
N, M, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
flg = 'War'
for i in range(X+1, Y+1):
	if max(x) < i and i <= min(y):
		flg = 'No ' + flg
		break
print(flg)

Problem: p03251
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,m,x,y = map(int,input().split())

lsx = list(map(int,input().split()))
lsy = list(map(int,input().split()))

if min(lsy) - max(lsx) > 0:
    print("No War")
else:
    print("War")


Failing test case input:
5 5 6 8
-1 0 1 5 -76
101 6 26

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
n,m,x,y = map(int,input().split())

lsx = list(map(int,input().split()))
lsx.append(x)
lsy = list(map(int,input().split()))
lsy.append(y)

if min(lsy) - max(lsx) > 0:
    print("No War")
else:
    print("War")
Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M, X, Y = list(map(int,input().split()))
x = list(map(int,input().split()))
y = list(map(int,input().split()))
x.append(X)
y.append(Y)
x.sort()
y.sort()

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


Failing test case input:
4 2 -55 -1
-35 -7 -35 -77
-22 75

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
N, M, X, Y = list(map(int,input().split()))
x = list(map(int,input().split()))
y = list(map(int,input().split()))
x.append(X)
y.append(Y)
x.sort()
y.sort()

if x[N] < y[0]:
    print("No War")
else:
    print("War")

Problem: p03251
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N, M, X, Y = map(int, input().split())
X = list(map(int, input().split()))
Y = list(map(int, input().split()))
Xm = max(X)
Ym = min(Y)
print(X < Y, Xm < Ym)
print('No War' if X < Y and Xm < Ym else 'War')


Failing test case input:
4 2 -48 -1
-20 -102 -91 -23
-22 75

Expected output:
War


Actual output:
False False
War


Fixed submission (verdict: Accepted):
N, M, x, y = map(int, input().split())
X = list(map(int, input().split()))
Y = list(map(int, input().split()))
Xm = max(X + [x])
Ym = min(Y + [y])

print('No War' if Xm < Ym else 'War')

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")

Failing test case input:
0 0 10 40
12 1 15
31 23

Expected output:
No War


Actual output:
No war


Fixed submission (verdict: Accepted):
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")

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M, X, Y = map(int, input().split())

x = list(map(int, input().split()))
y = list(map(int, input().split()))    

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

Failing test case input:
3 2 10 40
8 11 9
16 11

Expected output:
War


Actual output:
No War


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

if (X < max(x)) and (max(x) < min(y)) and (min(y) <= Y):
    print("No War")
else:
    print("War")
Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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("No War")
else:
    print('War')


Failing test case input:
5 3 6 8
-1 0 1 5 -100
101 6 14

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
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')

Problem: p03251
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,m,X,Y=sorted(map(int,input().split()))
x=max(X,max(map(int,input().split())))
y=min(Y,min(map(int,input().split())))
print("No War" if x<y else "War")

Failing test case input:
5 5 6 1
-1 0 1 5 -76
101 6 26

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
n,m,X,Y=map(int,input().split())
x=max(X,max(map(int,input().split())))
y=min(Y,min(map(int,input().split())))
print(["War","No War"][x<y])

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,x,y=map(int,input().split())
xl=list(map(int,input().split()))
yl=list(map(int,input().split()))
zl=[i for i in range(x+1,y)]
flag=False
for i in zl:
    if i>sum(xl) and sum(yl)>=i:
        flag=True

if flag:
    print("War")
else:
    print("No war")

Failing test case input:
3 0 10 40
8 1 15
16 23

Expected output:
No War


Actual output:
War


Fixed submission (verdict: Accepted):
n,m,x,y=map(int,input().split())
xl=list(map(int,input().split()))
yl=list(map(int,input().split()))
zl=[i for i in range(x+1,y)]
flag=False
for i in zl:
    if i>max(xl) and min(yl)>=i:
        flag=True

if flag:
    print("No War")
else:
    print("War")

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=list(map(int,input().split()))
if max(b)<=min(c):
    for i in range(min(c)-max(b)):
        if a[2]<max(b)+i+1<=a[3]:
            print("War")
            break
else:
    print("No War")

Failing test case input:
0 2 10 40
8 15 15
16 22

Expected output:
No War


Actual output:
War


Fixed submission (verdict: Accepted):
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=list(map(int,input().split()))
d=""
if max(b)<min(c):
    for i in range(min(c)-max(b)):
        if a[2]<max(b)+i+1<=a[3]:
            d="No War"
            break
        else:
            d="War"
else:
    d="War"
print(d)
Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

import sys
input = sys.stdin.readline

_, _, X, Y = map(int, input().split())

lst_x = list(map(int, input().split()))
lst_y = list(map(int, input().split()))

if max(lst_x) <= min(lst_y):
    print("No war")
else:
    print("War")

Failing test case input:
0 0 10 40
12 1 15
16 70

Expected output:
No War


Actual output:
No war


Fixed submission (verdict: Accepted):

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

x = max(list(map(int, input().split())))
y = min(list(map(int, input().split())))

ans = "War"
for z in range(X+1, Y+1):
    if x < z <= y:
        ans = "No War"
print(ans)

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
if __name__ == '__main__':
    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()]

    result = "War"

    for i in range(-100, 101):
        if max(x) < i and min(y) >= i:
            result = "No war"

    print(result)


Failing test case input:
0 0 10 40
12 1 15
31 23

Expected output:
No War


Actual output:
No war


Fixed submission (verdict: Accepted):
if __name__ == '__main__':
    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()]

    result = "War"

    for i in range(-100, 101):
        if X < i and Y >= i and max(x) < i and min(y) >= i:
            result = "No War"

    print(result)

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M,X,Y = map(int,input().split())
x = list(input().split())
y = list(input().split())

if X >= Y:
  print("War")
  exit()
else:
  Z = Y
  
if int(max(x)) < Z and int(min(y)) >= Z:
  print("No War")
else:
  print("War")

Failing test case input:
5 3 6 8
-10 4 1 5 -100
101 6 14

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
N,M,X,Y = map(int,input().split())
x = list(map(int,input().split()))
y = list(map(int,input().split()))
if max(max(x),X) < min(min(y),Y):
  print("No War")
else:
  print("War")

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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("War")
else:
    print("No War")

Failing test case input:
5 3 6 8
-10 4 1 5 -100
101 6 14

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):

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("War")
else:
    print("No War")
Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M, X, Y = map(int, input().split(' '))
x = list(map(int, input().split(' '))) + [X]
y = list(map(int, input().split(' '))) + [Y]

if min(y) > max(x):
    print('No war')
else:
    print('War')

Failing test case input:
3 2 10 40
8 1 15
16 22

Expected output:
No War


Actual output:
No war


Fixed submission (verdict: Accepted):
N, M, X, Y = map(int, input().split(' '))
x = list(map(int, input().split(' '))) + [X]
y = list(map(int, input().split(' '))) + [Y]

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

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m, x, y = map(int, input().split())
xx = [int(i) for i in input().split()]
yy = [int(i) for i in input().split()]
if max(xx) < min(yy):
    print('No War')
else:
    print('War')

Failing test case input:
5 5 6 0
-1 0 1 5 -76
101 6 26

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
n, m, x, y = map(int, input().split())
xx = [int(i) for i in input().split()]
yy = [int(i) for i in input().split()]

ans = 'No War' if max(max(xx), x) < min(min(yy), y) else 'War'
print(ans)

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m, x, y = list(map(int, input().split()))

x_ = list(map(int, input().split()))
y_ = list(map(int, input().split()))

max_x = max(x_)

if max_x < 0:
    max_y = min(y_)
else:
    max_y = max(y_)

if max_x < max_y:
    print('No War')
else:
    print('War')

Failing test case input:
5 5 6 0
-1 -1 0 8 -237
101 6 3

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
n, m, x, y = list(map(int, input().split()))

x_ = list(map(int, input().split()))
y_ = list(map(int, input().split()))

if max(x_) > x:
    max_x = max(x_)
else:
    max_x = x

if min(y_) > y:
    min_y = y
else:
    min_y = min(y_)


if max_x < min_y:
    print('No War')
else:
    print('War')

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
H, M, X, Y = map(int, input().split())
x = map(int, input().split())
y = map(int, input().split())

r = [any(i < z for i in x) and any(i < z for i in y) for z in range(X+1, Y+1)]
print("No War" if r else "War")

Failing test case input:
5 3 6 8
-1 0 1 5 -100
101 6 14

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
H, M, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
 
r = any(all(i < z for i in x) and all(i >= z for i in y) for z in range(X+1, Y+1))
print("No War" if r else "War")
Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M,X,Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))

if X>Y:
    print("War")
elif max(x)>min(y):
    print("War")
else:
    print("No War")

Failing test case input:
5 5 6 8
-1 0 1 5 -76
101 6 26

Expected output:
War


Actual output:
No War


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

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

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M,X,Y=sorted(map(int, input().split()))
xi=sorted(map(int, input().split()))
yi=sorted(map(int, input().split()))
Zx = max(xi[-1],X)
Zy = min(yi[0],Y)
if Zx < Zy:
  print('No War')
else:
  print('War')


Failing test case input:
5 5 6 0
-1 0 1 5 -76
101 6 14

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
N,M,X,Y=map(int, input().split())
Zx=max(map(int, input().split()))
Zy=min(map(int, input().split()))
if X < Zy and Zy <= Y and Zx < Zy:
  print('No War')
else:
  print('War')

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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 y[0] >= x[n-1]:
    if x[n-1] > X and y[0] <= Y: print("No War")
    else: print("War")
else: print("War")

Failing test case input:
3 2 10 40
8 11 9
16 11

Expected output:
War


Actual output:
No War


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

x.sort()
y.sort()

for z in range(X+1, Y):
    if x[n-1] < z  <= y[0]:
        print("No War")
        exit()
print("War")

Problem: p03251
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,m,X,Y = map(int,input().split())
x = list(map(int,input().split()))
y = list(map(int,input().split()))
s = 1
for i in range(-100,101):
    if X < i <= Y and max(x) < i <= min(y):
        s = 0
print(["No war","War"][s])

Failing test case input:
0 0 10 40
8 1 15
16 23

Expected output:
No War


Actual output:
No war


Fixed submission (verdict: Accepted):
n,m,X,Y = map(int,input().split())
x = list(map(int,input().split()))
y = list(map(int,input().split()))
s = 1
for i in range(-100,101):
    if X < i <= Y and max(x) < i <= min(y):
        s = 0
print(["No War","War"][s])

Problem: p03251
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,a,b=map(int, input().split())
x=list(map(int, input().split()))
y=list(map(int, input().split()))
j=False
for i in range(a+1,b+1):
    if i<max(x) and min(y)>=i:
        j=True

print("No War" if j else "War")

Failing test case input:
3 2 10 40
8 11 15
16 11

Expected output:
War


Actual output:
No War


Fixed submission (verdict: Accepted):
n,m,a,b=map(int, input().split())
x=list(map(int, input().split()))
y=list(map(int, input().split()))
j=False
for i in range(a+1,b+1):
    if max(x)<i and min(y)>=i:
        j=True

print("No War" if j else "War")