public static void max_prod(Integer[] v) {

        int maxProd = 0;
        for (int i = 0; i < v.length; i++) {
            for (int j = 0; j < v.length; j++) {
                if( i == j) continue;
                int prod = v[i] * v[j];
                if(prod > maxProd && prod % 3 == 0) maxProd = prod;
            }
        }

        System.out.println(maxProd);

    }