..
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));
int s = Integer.parseInt(reader.readLine());
int q = Integer.parseInt(reader.readLine());
int w = Integer.parseInt(reader.readLine());
if (s == q)
System.out.println(s + " "+ q);
if (q == w)
System.out.println(q + " "+ w);
if (s == w)
System.out.println(s + " "+ q);
if (s == q && w == s && q == w)
System.out.println(s + " "+ q + " "+ w);
}
}