/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		List<String> numList = Arrays.asList("2541.36", "2965.88", "1965.32", "1845.23", "7021.11", "9652.74", "1469.3");

        Comparator<String> sort = (o1, o2) -> Double.valueOf(o1).compareTo(Double.valueOf(o2));
        String max = Collections.max(numList, sort);
        String min = Collections.min(numList, sort);

        System.out.println(max);
        System.out.println(min);
	}
}