pB = map(int, raw_input().split(' ')) #Builder position
pW = map(int, raw_input().split(' ')) #Wallls coordinates

if pB[0] > pW[0] and pB[0] < pW[2] and pB[1] >  pW[1] and pB[1] < pW[3]:
	print 'Yes'
else:
	print 'No'
0f73d301cc5db94ed2de7245fac13917a4b87ba0
pB = map(int, raw_input().split(' ')) #Builder position
pW = map(int, raw_input().split(' ')) #Wallls coordinates

if pB[0] > pW[0] and pB[0] < pW[2] and pB[1] >  pW[1] and pB[1] < pW[3]:
	print 'Yes'
else:
	print 'No'