public int computeArea(int A, int B, int C, int D, int E, int F, int G, int H) {
        int twoArea = (C - A) * (D - B) + (G - E) * (H - F);
        if (C < E || G < A || H < B || D < F) return twoArea;
        int L1 = Math.min(C, G) - Math.max(A, E);
        int L2 = Math.min(D, H) - Math.max(B, F);
        return twoArea - L1 * L2;
    }