function reduce() {
    local f=$1;shift;
    local v=$1;shift;
    while [ $# -gt 0 ]
    do
        v=$($f $v $1)
        shift
    done
    echo $v
}

function _max() {
    echo $[$1>$2?$1:$2]
}

function max() {
    echo $(reduce _max $@)
}

function _min() {
    echo $[$1<$2?$1:$2]
}

function min() {
    echo $(reduce _min $@)
}

read N M X Y
read x
read y
max_x=$(max X ${x[@]})
min_y=$(min Y ${y[@]})
if ((max_x < min_y))
then
    echo "No War"
else
    echo "War"
fi
