#include int n,p; char prop[81], bestprop[81]; double price,bestprice; int r,bestr; main(){ int i,j,k; for (i=1;;i++){ scanf("%d%d\n",&n,&p); if (n == 0) break; bestr = -1; for (j=0;j bestr || (r == bestr && price < bestprice)) { bestr = r; bestprice = price; strcpy(bestprop,prop); } for (j=0;j