static Line closestPair(ArrayList<Shapes.Point> xPoints, ArrayList<Shapes.Point> yPoints, ArrayList<Shapes.Point> aux,
                            int left, int right, Line s0) {
        if (left >= right) {
            return new Line(0, 0, Integer.MAX_VALUE, Integer.MAX_VALUE);
        }

        int middle = ((right + left) >> 1) + ((right + left) % 2);
        Shapes.Point mPoint = xPoints.get(middle);

        Line lS;
        lS = closestPair(xPoints, yPoints, aux, left, middle - 1, s0);
        Line rS;
        rS = closestPair(xPoints, yPoints, aux, middle + 1, right, s0);
        Line s = lS.compare(rS).compare(s0);

        int index = 0;

        for (int i = left; i <= right; i++) {
            if ((Math.abs((new Line(yPoints.get(i), mPoint)).getSize())) < (s.getSize())) {
                aux.add(index++, yPoints.get(i));
            }
        }

        for (int i = 0; i < index; i++) {
            for (int j = i + 1; (j < index) && (aux.get(i).getY() - aux.get(j).getY()) <
                    (s.getSize()); j++) {
                if (((new Line(aux.get(i), aux.get(j))).getSize()) < (s.getSize())) {
                    s = new Line(aux.get(i), aux.get(j));
                }
            }
        }


        g.setColor(Color.YELLOW);
        if (lS.getPoint1().getX() < 400) {
            drawB(lS);
        }
        g.setColor(Color.BLUE);
        if (rS.getPoint1().getX() < 400) {
            drawB(rS);
        }
        g.setColor(Color.BLACK);
        drawB(s);
        jLabel1.update(jLabel1.getGraphics());
        g.setColor(Color.RED);

        return s;
    }