#include <bits/stdc++.h> using namespace std; int main() { int n, a, b; cin >> n; map<int, int> sum_map; while (n--) { cin >> a >> b; sum_map[a] += b; } for (auto cur : sum_map) cout << cur.first << " &qu...