#include #include #include #include #include #include #include #include #include #include using namespace std; struct aaa{aaa(){cin.tie(nullptr); ios::sync_with_stdio(false); cout<ostream &operator<<(ostream &o,const vector&v){o<<"{";for(int i=0;i<(int)v.size();i++)o<<(i>0?", ":"")<bool chmax(T a,T& b) {if (b; int main() { int n; cin >> n; vector

ab; for(int i=0; i> a >> b; ab.emplace_back(a,b); } auto c = [](P x, P y) {return (float)x.first/x.second < (float)y.first/y.second;}; sort(ab.rbegin(), ab.rend(), c); for (auto [a, b] : ab) { cout << a << " " << b << endl; } }