public static void main(String[] args) {
        for (int times = 0; times < 10000; ++times) {
            Rectangle R, S;
            if (args.length == 8) {
                R = new Rectangle(Integer.parseInt(args[0]), Integer.parseInt(args[1]),
                        Integer.parseInt(args[2]), Integer.parseInt(args[3]));
                S = new Rectangle(Integer.parseInt(args[4]), Integer.parseInt(args[5]),
                        Integer.parseInt(args[6]), Integer.parseInt(args[7]));
            } else {
                Random r = new Random();
                R = new Rectangle(r.nextInt(100) + 1, r.nextInt(100) + 1,
                        r.nextInt(100) + 1, r.nextInt(100) + 1);
                S = new Rectangle(r.nextInt(100) + 1, r.nextInt(100) + 1,
                        r.nextInt(100) + 1, r.nextInt(100) + 1);
            }
            // Intersect rectangle.
            boolean res = is_intersect(R, S);
            System.out.println(res);
            Rectangle ans = intersect_rectangle(R, S);
            ans.print("ans: ");
            assert(res == false || (ans.width >= 0 && ans.height >= 0));
        }
    }