import java.util.*;
import java.util.Arrays;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

public class Zadatak1 {
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        Integer[] array = new Integer[scanner.nextInt()];
        int max = scanner.nextInt();

        IntStream.range(0, array.length).forEach(i -> array[i] = scanner.nextInt());

        List<Integer> asList = Arrays.asList(array);
        Set<Integer> mySet = new HashSet<>(asList).stream().filter(i -> i >= max).collect(Collectors.toSet());

        System.out.println(mySet.size());
        for (int i : mySet)
            System.out.print(i + " ");
        System.out.println();



    }
}