#include <iostream> #include <map> using namespace std; int main() { int n; cin >> n; map<int, int> mymap; while (n--) { int a, b; cin >> a >> b; mymap[a] += b; } for (auto it : mymap) { cout <&l...