#include using namespace std; main(){ int n; cin>>n; using T = tuple; vector A; for(int i=0;i>a>>b; r=a/b; A.emplace_back(r,a,b); } sort(begin(A),end(A),greater<>()); for(int i=0;i