import java.util.Scanner;

public class Shodnost {

	// Staticka metoda pro nacteni INTu //
	public static int NactiInt(String text) {
	    Scanner sc = new Scanner(System.in);
		System.out.print(text + ": ");
		int x = sc.nextInt();
		return x;
	}		
	
	public static void main(String[] args) {
		int a=NactiInt("Zadej cislo a");
		int b=NactiInt("Zadej cislo b");
		int c=NactiInt("Zadej cislo c");
		int d=NactiInt("Zadej cislo d");

		// Proste podminky pro shodnost vsech ctyr nebo nekterych 3 cisel
        if (a == b && b == c && c == d){
            System.out.println("Vsechna cisla jsou shodna.");
        }
        else {
            if (b == c && c == d){            	
            	System.out.println("Cisla b, c, d jsou shodna");
            }	
            else {
            	if (a == b && b == c){
            		System.out.println("Cisla a, b, c jsou shodna");
            	}
            	else {
            		if (a == b && b == d){
            			System.out.println("Cisla a, b, d jsou shodna");
            		}
            		else {
            			if (a == c && c == d){
            				System.out.println("Cisla a, c, d jsou shodna");
            			}
            			else
            			{
            				System.out.println("Mezi zadanymi cisly nebyla alespon 3 stejna");
            			}
            		}
            	}
            }
        }
	}
}
