#include<iostream>
using namespace std;
int x1,x2,x3,x4,x5,x6;
int y1,y2,y3,y4,y5,y6;
bool check(int x,int y,int x1,int y1,int x2,int y2)
{
return x<x1||x>x2||y<y1||y>y2;
}
void solve()
{
for(int x=x1;x<=x2;x++)
{
if(check(x,y1,x3,y3,x4,y4)&&check(x,y1,x5,y5,x6,y6))
{
cout<<"YES"<<endl;
return ;
}
if(check(x,y2,x3,y3,x4,y4)&&check(x,y2,x5,y5,x6,y6))
{
cout<<"YES"<<endl;
return ;
}
}
for(int y=y1;y<=y2;y++)
{
if(check(x1,y,x3,y3,x4,y4)&&check(x1,y,x5,y5,x6,y6))
{
cout<<"YES"<<endl;
return ;
}
if(check(x2,y,x3,y3,x4,y4)&&check(x2,y,x5,y5,x6,y6))
{
cout<<"YES"<<endl;
return ;
}
}
cout<<"NO"<<endl;
}
int main()
{
cin>>x1>>y1>>x2>>y2;
cin>>x3>>y3>>x4>>y4;
cin>>x5>>y5>>x6>>y6;
x1*=2;y1*=2;
x2*=2;y2*=2;
x3*=2;y3*=2;
x4*=2;y4*=2;
x5*=2;y5*=2;
x6*=2;y6*=2;
solve();
return 0;
}