Language: C++

#include<cstdio>
#include<iostream>
#include<string>
#include<set>
#include<map>
#include<vector>
#include<deque>
#include<tuple>
#include<algorithm>
#include<numeric>
#include<limits>
#include<boost/multiprecision/cpp_int.hpp>
using namespace boost::multiprecision;
using namespace std;
#define BEGIN ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define END return EXIT_SUCCESS
#define rep(I,N) for(auto I=0;I<(N);++I)
#define up(I,A,B) for(auto I=(A);I<=(B);++I)
#define dw(I,A,B) for(auto I=(A);I>=(B);--I)
#define all(C) (C).begin(),(C).end()
#define rall(C) (C).rbegin(),(C).rend()
#define ft first
#define sd second
#define mp make_pair
#define mt make_tuple
#define pf push_front
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define rs resize
typedef long long ll;
typedef unsigned long long ull;
template<class T>inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T>inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
template<class T>inline void                                      in(T &p){cin>>p;}
template<class T1,class T2>inline void                            in(T1 &p1,T2 &p2){cin>>p1>>p2;}
template<class T1,class T2,class T3>inline void                   in(T1 &p1,T2 &p2,T3 &p3){cin>>p1>>p2>>p3;}
template<class T1,class T2,class T3,class T4>inline void          in(T1 &p1,T2 &p2,T3 &p3,T4 &p4){cin>>p1>>p2>>p3>>p4;}
template<class T1,class T2,class T3,class T4,class T5>inline void in(T1 &p1,T2 &p2,T3 &p3,T4 &p4,T5 &p5){cin>>p1>>p2>>p3>>p4>>p5;}
template<class T>inline void                                      ins(T &p){for_each(all(p),in<decltype(p[0])>);}
template<class T>inline void                             out(T p){cout<<p<<endl;}
template<class T1,class T2>inline void                   out(T1 p1,T2 p2){cout<<p1<<" "<<p2<<endl;}
template<class T1,class T2,class T3>inline void          out(T1 p1,T2 p2,T3 p3){cout<<p1<<" "<<p2<<" "<<p3<<endl;}
template<class T1,class T2,class T3,class T4>inline void out(T1 p1,T2 p2,T3 p3,T4 p4){cout<<p1<<" "<<p2<<" "<<p3<<" "<<p4<<endl;}
inline                                              void out(double p){printf("%.10f\n",p);}
template<class T>inline                             void outs(T p){for_each(all(p),out<decltype(p[0])>);}
template<class T>inline void outs(vector<T> V){int n=V.size();rep(i,n)cout<<V[i]<<" \n"[i==n-1];}
//const long mod=(long)1e9+7;
inline void solve(void){
  int N;in(N);
  vector<pair<long,long>>A(N);
  vector<bool>B(N,true),C(N,true);
  rep(i,N){
    long X,L;in(X,L);
    A[i]=mp(X,L);
  }
  sort(all(A));
  if(N==1){
    out(1);
    return;
  }
  if(N==2){
    if(A[0].ft+A[0].sd>A[1].ft || A[1].ft-A[1].sd<A[0].ft)out(1);
    else out(2);
    return;
  }
  long ans=N;
  rep(i,N){
    if(i==0){
      if(A[i].ft+A[i].sd>A[i+1].ft)ans--,B[i]=false;
    }else if(i==N-1){
      if(A[i].ft-A[i].sd<A[i-1].ft)ans--;
    }else{
      dw(j,i-1,0){
        if(!B[j])continue;
        if(A[i].ft-A[i].sd<A[j].ft){
          ans--;B[i]=false;break;
        }
      }
      up(j,i+1,N-1){
        if(!B[j])continue;
        if(A[i].ft+A[i].sd>A[j].ft){
          ans--;B[i]=false;break;
      }
    }
  }
  out(ans);
}
int main(int argc,char**argv){
  BEGIN;
  solve();
  END;
}


Compiler output:
a.cc:12:9: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
   12 | #include<boost/multiprecision/cpp_int.hpp>
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.