I’ve re-written this code a bunch, and in a few different ways. No matter what I do I can’t get it to pass. Even defining that it shouldn’t show anything if none are equal, but that’s what I can’t pass
package com.codegym.task.task04.task0417;
/*
Do we have a pair?
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String a = reader.readLine();
int input1= Integer.parseInt(a);
String b = reader.readLine();
int input2 = Integer.parseInt(b);
String c = reader.readLine();
int input3 = Integer.parseInt(c);
if (input1==input2&& input1 !=input3)
System.out.println(input1 + " "+ input2);
else if (input2==input3 && input1 !=input2)
System.out.println(input2+" "+input3);
else if (input1==input3&& input2!=input3)
System.out.print (input1+" "+ input3);
else if (input1== input2&&input2==input3&&input1==input3)
System.out.println(input1+" "+ input2+ " "+ input3);
else if (input1!= input2&&input1!=input3&&input2!=input3)
System.out.println();
}
}