#include #include #include using namespace std; using P = pair; int main(void){ int n; cin >> n; vector

ans; for(int i=0; i> a >> b; ans.emplace_back(a, b); } sort(begin(ans), end(ans), [](const P& a, const P& b){ return a.first*b.second>a.second*b.first; }); for(auto [a, b]:ans) cout << a << ' ' << b << endl; return 0; }