#include using namespace std; typedef pair frcval; bool pairCompare(const frcval& firstElof,const frcval& secondElof) { return firstElof.first > secondElof.first; } int main() { vector frcvec; int n; cin>>n; for(int i=0;i>a>>b; tmp.first = a/b; tmp.second = to_string((int)a)+ " "+to_string((int)b); frcvec.push_back(tmp); } sort(frcvec.begin(),frcvec.end(),pairCompare); for(int i=0;i