#include #include #include using namespace std; typedef pair pii; map> g; int N; map used; int x[101], y[101]; bool rec(int p, int q, int i, int j){ used[pii(i, j)]=1; bool ret=true; for(pii z: g[pii(i, j)]){ //cout<> N; for(int i=0; i> a>> b>> c>> d; //a--; b--; c--; d--; g[pii(a, b)].push_back(pii(c, d)); g[pii(c, d)].push_back(pii(a, b)); x[i]=a; y[i]=b; } bool ok=true; for(int i=0; i