(算出a和b的交集q,a和c的交集w)
(再算出q和w的交集e)
(如果q+w-e是a的面积,那么a就被完全覆盖了)
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
struct p{
ll x1,y1,x2,y2;
}a,b,c;
ll ji(p a,p b)
{
ll x=min(a.x2,b.x2)-max(a.x1,b.x1);
ll y=min(a.y2,b.y2)-max(a.y1,b.y1);
if(x<0||y<0) return 0;
else return x*y;
}
p make_p(p a,p b)
{
p temp;
temp.x1=max(a.x1,b.x1);
temp.x2=min(a.x2,b.x2);
temp.y1=max(a.y1,b.y1);
temp.y2=min(a.y2,b.y2);
return temp;
}
int main()
{
cin >> a.x1 >> a.y1 >> a.x2 >> a.y2;
cin >> b.x1 >> b.y1 >> b.x2 >> b.y2;
cin >> c.x1 >> c.y1 >> c.x2 >> c.y2;
ll s=ji(a,c)+ji(a,b)-ji(make_p(a,b),make_p(a,c));
if( s!=(a.x2-a.x1)*(a.y2-a.y1) ) cout<<"YES";
else cout<<"NO";
}