#include <cstdio>
#include <algorithm>

//check common interval existence
bool range(int  n1, int n2, int n3, int n4){
	 int min1 = n1, max1 = n2, min2 = n3, max2 = n4;
     if ( n1 > n2 ) std::swap(min1, max1);
	 if ( n3 > n4 ) std::swap(min2, max2);
	 return !( min2 > max1 || max2 < min1 );
}

int main()
{
    int A, B, C, D;         //coords
    int tA, tB, tC, tD;     //time

    scanf("%d %d %d %d", &A, &tA, &B, &tB);
    scanf("%d %d %d %d", &C, &tC, &D, &tD);

     if ( range( A, B, C, D ) && range( tA, tB, tC, tD ) )
    {
    //common line equation Ax + By + C == 0 coefficients
       int a1 = tA-tB, b1 = B-A, c1 = A*tB - B*tA;
       int a2 = tC-tD, b2 = D-C, c2 = C*tD - D*tC;

       int r1 = a1*C + b1*tC + c1;
       int r2 = a1*D + b1*tD + c1;
       int r3 = a2*A + b2*tA + c2;
       int r4 = a2*B + b2*tB + c2;

    //if both dots lie in different semiareas, or at least one of them lies on the segment
         if( r1*r2 <= 0 && r3*r4 <= 0 )
        {
                printf("Yes\n");
                return 0;
        }
    }
    printf("No\n");
    return 0;
}