public P039C() {
        Scanner sc = new Scanner(System.in);
        N = sc.nextInt();
        
        segments = new Segment[N];
        dp = new int[N][N];
        r  = new boolean[N][N];
        prev = new int[N];
        for (int[] row: dp) {
            Arrays.fill(row, -1);
        }

        for (int i = 0; i < N; i++) {
            int c = sc.nextInt();
            int r = sc.nextInt();
            segments[i] = new Segment(c-r, c+r, i+1);
        }
        
        Arrays.sort(segments);
        int minLeft = segments[0].left;
        int minIndex = 0;
        for (int i = 1; i < N; i++) {
            if (segments[i].left < minLeft) {
                minLeft = segments[i].left;
                minIndex = i;
            }
        }
        
        for (int i = N-1; i >= 0; i--) {
            int left = segments[i].left;
            int p = i-1;
            while (p >= 0 && segments[p].right > left) p--;
            prev[i] = p;
        }
        
        System.out.println(solve(minIndex, N-1));
        build(minIndex, N-1);
    }