#include using namespace std; #define rep(i,n) for(ll i=0;i=0;i--) #define perl(i,r,l) for(ll i=r-1;i>=l;i--) #define fi first #define se second #define pb push_back #define ins insert #define pqueue(x) priority_queue,greater> #define all(x) (x).begin(),(x).end() #define CST(x) cout<; using vvl=vector>; using pl=pair; using vpl=vector; using vvpl=vector; const ll MOD=1000000007; const ll MOD9=998244353; const int inf=1e9+10; const ll INF=4e18; const ll dy[8]={1,0,-1,0,1,1,-1,-1}; const ll dx[8]={0,1,0,-1,1,-1,1,-1}; template inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } template inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } struct line{ ll x1,y1,x2,y2; }; bool cross(line t,line p){ ll ret=(t.x1-t.x2)*(p.y1-t.y1)+(t.y1-t.y2)*(t.x1-p.x1); ret*=(t.x1-t.x2)*(p.y2-t.y1)+(t.y1-t.y2)*(t.x1-p.x2); //cout << ret <> n; vector v(n); rep(i,n){ cin >> v[i].x1 >> v[i].y1 >> v[i].x2 >> v[i].y2; } ll ans=0; rep(i,2*n){ rep(j,2*n){ if(i==j)continue; line st; if(i/n)st.x1=v[i%n].x2,st.y1=v[i%n].y2; else st.x1=v[i%n].x1,st.y1=v[i%n].y1; if(j/n)st.x2=v[j%n].x2,st.y2=v[j%n].y2; else st.x2=v[j%n].x1,st.y2=v[j%n].y1; //cout << st.x1 <<" " << st.y1 <