#include #define rep(i,n) for(int i=0;i ; const int INF = 1e9; const int MOD = 1000000007; int main(){ int n; cin >> n; vector

a(n); rep(i,n) cin >> a[i].first >> a[i].second ; sort(a.begin(),a.end(),[](P l,P r){ return l.first*r.second > r.first*l.second;}); rep(i,n) cout << a[i].first << " " << a[i].second << endl; return 0; }