n, m = io.read("*n", "*n")
x = {}
x[1] = io.read("*n")
y = {}
y[1] = io.read("*n")
for i = 1, n do
  x[i + 1] = io.read("*n")
end
for i = 1, m do
  y[i + 1] = io.read("*n")
end
table.sort(x)
table.sort(y)
f = y[1] <= x[#x]
print(f and "War" or "No War")
