#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int co[400040] = { 0 }; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { int x, r; cin >> x >> r; co[x - r + 200000]++; co[x + r + 200000]--; } int ans = 0, c = 0; for (int i = 0; i < 400040; i++) { c += co[i]; if (c > ans) { ans = c; } } cout << ans << endl; return 0; }