public static void main(String[] args) {

        int count = 0;
        for (int i = 10; i < 1000; i++) {
            for (int j = 10; j < 1000; j++) {
                
                int tempInt = i * j;
                String tempString = String.valueOf(tempInt);
                int length = tempString.length();

                if (length % 2 == 0) {
                    String partOne = tempString.substring(0, length / 2);
                    String partTwo = tempString.substring((length / 2), length);

                    partTwo = new StringBuffer(partTwo).reverse().toString();

                    if (partOne.equals(partTwo)) {
                        count = tempInt;
                        System.out.print(count+ " ");
                    }

                } else {
                    String partOne = tempString.substring(0, ((length - 1) / 2));
                    String partTwo = tempString.substring(((length - 1) / 2) + 1, length);

                    partTwo = new StringBuffer(partTwo).reverse().toString();

                    if (partOne.equals(partTwo)) {
                        count = tempInt;
                        System.out.print(count + " ");
                    }
                }
            }
        }
        System.out.println();
        System.out.println();
        System.out.println(count);

    }