naive solution
private static int cuts(int A, int B){\n        int sum = A + B;\n        int length = sum/4;\n        while(length>0){\n            if((A/length + B/length)==4
private static int cuts(int A, int B){\n        int sum = A + B;\n        int length = sum/4;\n        while(length>0){\n            if((A/length + B/length)==4)\n                return length;\n            else\n                length--;\n        }\n        return 0;\n    }
[]