#include #include using namespace std; int p[210000]; int q[210000]; struct st{ int t,d; int id; st(){} }; inline bool operator<(const st &a,const st &b){ return a.t*b.d>a.d*b.t; } st r[210000]; int main(){ int a;scanf("%d",&a); for(int i=0;i