#include #define rep(i,n) for (int i=0; i<(n); ++i) using namespace std; using ll=long long; int main(){ int n; cin>>n; vector>ab(n); rep(i,n){ double a,b; cin>>a>>b; ab[i]=(make_tuple(a/b,a,b)); } sort(ab.rbegin(),ab.rend()); rep(i,n){ cout<(ab[i])<<" "<(ab[i])<