private static List<Integer> quadraticCongruenceSimpleSolve(int a, final int m) {
        a = normalizeIntModulo(a, m);
        int testA = a;
        int testM = m;
        if (isPowerOf2(m))
            testM = m/2;
        
        final List<Integer> result = new ArrayList<>();
        for (int i = 0; i < testM; ++i) {
            if (isPerfectSquare(testA)) {
                final int x1 = (int)Math.sqrt(testA);
                if (modPow(x1, 2, m) == a)
                    quadraticCongruenceSimpleFillSolution(result, x1, testM);
                if (result.size() == 4)
                    break;
            }
            testA += testM;
        }
        
        if (!result.isEmpty()) {
            Collections.sort(result);
            result.add(testM);
            if ((result.size() == 5) && (m % 2 == 0))  // 5 = 4 + 1 for mod
                return binomialCongruenceRuleOut(result);
        }
        return result;
    }