#include #include #include #include #include #include #include #include #include using namespace std; using ll=long long; using ld=long double; using P=pair; #define MOD 1000000007LL #define INF 1000000000LL #define EPS 1e-10 #define FOR(i,n,m) for(ll i=n;i<(ll)m;i++) #define REP(i,n) FOR(i,0,n) #define DUMP(a) REP(d,a.size()){cout<> n; vector> a(n); REP(i,n) cin >> a[i].second.first >> a[i].second.second; REP(i,n) a[i].first = a[i].second.first / (ld)a[i].second.second; sort(ALL(a)); for(ll i = n - 1; i >= 0; i--) { cout << a[i].second.first << " " << a[i].second.second << endl; } return 0; }