не проходит проверку, хотя проверял, при вводе одинаковых чисел, выводит все такие числа.
package com.javarush.task.task04.task0417;
/*
Существует ли пара?
*/
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Solution {
public static void main(String[] args) throws Exception {
//напишите тут ваш код
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String a = reader.readLine();
int b = Integer.parseInt(a);
String c1 = reader.readLine();
int c = Integer.parseInt(c1);
String d1 = reader.readLine();
int d = Integer.parseInt(d1);
if ((b==c) && (b==d)) {
System.out.println(b + " " + c + " " + d);
}
else if ((b==c) && (c!=d)){
System.out.println(b + " " +c);
}
else if ((c==d) && (c!=b)) {
System.out.println(c + " " + d);
}
}
}