Click Here to go back to the homepage.

No Duplicates Solution:


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.stream.Collectors;

public class Kattis {
    public static void main(String[] args) throws Exception{
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        HashSet<String> hs = new HashSet<>();
        List<String> words = Arrays.stream(reader.readLine().split(" ")).collect(Collectors.toList());
        for(String s:words)
            if(!hs.add(s)) {
                System.out.println("no");
                return;
            }
        System.out.print("yes");
    }
}