while True:
    try:
        ax,ay,bx,by,cx,cy,dx,dy = map(float, raw_input().split())
        if ax <=bx:
            if dx > (ax+cx)/2.0 or (dy-cy)*(dy-ay) > 0:
                print "NO"
            else:
                print "YES"
        else:
            if dx < (ax+cx)/2.0 or (dy-cy)*(dy-ay) > 0:
                print "NO"
            else:
                print "YES"
    except:
        break