//================================= // Created on: 2018/11/09 21:24:27 //================================= #include int main() { int N; std::cin >> N; using P = std::pair; std::vector

c(N); for (int i = 0; i < N; i++) { std::cin >> c[i].first >> c[i].second; } auto comp = [](const P& p1, const P& p2) { return p1.first * p2.second > p1.second * p2.first; }; std::sort(c.begin(), c.end(), comp); for (int i = 0; i < N; i++) { std::cout << c[i].first << " " << c[i].second << std::endl; } return 0; }