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 { int[] x = new int[3]; for (int i = 0; i < 3; i++) { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int a = Integer.parseInt(reader.readLine()); x[i] = a; } if (x[0] == x[1] && x[0] !=x[2]) { System.out.println(x[0] + " " + x[1]); } else if (x[1] == x[2] && x[1] !=x[0]) { System.out.println(x[1] + " " + x[2]); } else if (x[2] == x[0] && x[2] !=x[0]) { System.out.println(x[1] + " " + x[2]); } else if (x[2] == x[0] && x[2] == x[1]) { System.out.println(x[1] + " " + x[2] + " " + x[0]); } } }