program main
implicit None
integer::n,m,x,y,z,i,j
integer,allocatable::a(:),b(:)

read *,n,m,x,y
allocate(a(n))
allocate(b(m))

read *,a
read *,b

z = x

do i = 1,n
	if(z < a(i))then
		z = a(i)
	endif
enddo

j = 0

if(z >= y)then
	j = 1
endif

do i = 1,m
	if(z >= b(i))then
		j = 1
	endif
enddo

if(j == 1)then
	print 101,'War'
	else
		print 101,'No war'
endif

101 format(a)
end program main