#include using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { cin.tie(nullptr)->sync_with_stdio(false); int n; cin >> n; constexpr int m = 4e5 + 5; constexpr int pos = 2e5 + 2; vector cnt(m, 0); rep(i, n) { int x, r; cin >> x >> r; cnt[x - r + pos]++, cnt[x + r + pos]--; } rep(i, m - 1) cnt[i + 1] += cnt[i]; cout << *max_element(cnt.begin(), cnt.end()) << '\n'; return 0; }