#include using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin>>n; vector x1(n), y1(n), x2(n), y2(n); for (int i=0; i>x1[i]>>y1[i]>>x2[i]>>y2[i]; if(x1[i]>x2[i]) swap(x1[i],x2[i]), swap(y1[i],y2[i]); } ll top=1, bot=0; for (int i=0; i0||x2[i]<0) continue; ll top2=y1[i]*x2[i]-y2[i]*x1[i]; ll bot2=x2[i]-x1[i]; if(top2<0) continue; if(top2*bot-bot2*top<0) top=top2, bot=bot2; } cout<