#include using namespace std; using Int=long long; using Real=long double; templateinline bool chmin(T&A,S B){if(A>B){A=B;return true;}else{return false;}} templateinline bool chmax(T&A,S B){if(AA[10]; void sol() { cin>>N; REP(i,N)cin>>A[i].first>>A[i].second; sort(A,A+N,[&](paira,pairb){return a.first*b.second>b.first*a.second;}); REP(i,N)cout<>T; while(T--)sol(); }