import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main {
	public static int exception(ArrayList<Integer> parse){
		int result = 0;
		for(int j = 0; j < parse.size(); ++j){
			if(parse.get(j) < -1000000 || parse.get(j) > 1000000){
				result = 0;
			}
			else {
				result = 1;
			}
		}
		return result;
	}
	public static void main(String[] args){
		/**
		 * ?????°?????£?¨?
		 */
		int n=0;
		int a=0,b=0; //int????????¨?????°
		long sum = 0;
		String str;
		/**
		 * ???????????£?¨?
		 */
		ArrayList<String> st = new ArrayList<String>();
		ArrayList<Integer> parse = new ArrayList<Integer>();
		/**
		 * ?????????????????\?????¨????????????????´?
		 */
		Scanner scan = new Scanner(System.in);
		n = scan.nextInt(); //????????°
		for(int i = 0;i < n; ++i){
			st.add(scan.next());
			parse.add(Integer.parseInt(st.get(i))); //int????????¨int????????????????´?
			sum += parse.get(i); // ????¨????
		}
		Collections.sort(parse); //int???????????????????????????
		if(exception(parse) == 0){
			System.out.println("??\??????????????§???.???????????????.");
		}
		else if(exception(parse) == 1){
		System.out.println(parse.get(0)+" "+parse.get(n-1)+" "+sum);
		}
	}

} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.Scanner; Scanner java.util public class Main {
	public static int exception(ArrayList<Integer> parse){
		int result = 0;
		for(int j = 0; j < parse.size(); ++j){
			if(parse.get(j) < -1000000 || parse.get(j) > 1000000){
				result = 0;
			}
			else {
				result = 1;
			}
		}
		return result;
	}
	public static void main(String[] args){
		/**
		 * ?????°?????£?¨?
		 */
		int n=0;
		int a=0,b=0; //int????????¨?????°
		long sum = 0;
		String str;
		/**
		 * ???????????£?¨?
		 */
		ArrayList<String> st = new ArrayList<String>();
		ArrayList<Integer> parse = new ArrayList<Integer>();
		/**
		 * ?????????????????\?????¨????????????????´?
		 */
		Scanner scan = new Scanner(System.in);
		n = scan.nextInt(); //????????°
		for(int i = 0;i < n; ++i){
			st.add(scan.next());
			parse.add(Integer.parseInt(st.get(i))); //int????????¨int????????????????´?
			sum += parse.get(i); // ????¨????
		}
		Collections.sort(parse); //int???????????????????????????
		if(exception(parse) == 0){
			System.out.println("??\??????????????§???.???????????????.");
		}
		else if(exception(parse) == 1){
		System.out.println(parse.get(0)+" "+parse.get(n-1)+" "+sum);
		}
	}

} Main public static int exception(ArrayList<Integer> parse){
		int result = 0;
		for(int j = 0; j < parse.size(); ++j){
			if(parse.get(j) < -1000000 || parse.get(j) > 1000000){
				result = 0;
			}
			else {
				result = 1;
			}
		}
		return result;
	} exception {
		int result = 0;
		for(int j = 0; j < parse.size(); ++j){
			if(parse.get(j) < -1000000 || parse.get(j) > 1000000){
				result = 0;
			}
			else {
				result = 1;
			}
		}
		return result;
	} int result = 0; result 0 for(int j = 0; j < parse.size(); ++j){
			if(parse.get(j) < -1000000 || parse.get(j) > 1000000){
				result = 0;
			}
			else {
				result = 1;
			}
		} int j = 0; int j = 0; j 0 j < parse.size() j parse.size() parse.size parse ++j ++j j {
			if(parse.get(j) < -1000000 || parse.get(j) > 1000000){
				result = 0;
			}
			else {
				result = 1;
			}
		} {
			if(parse.get(j) < -1000000 || parse.get(j) > 1000000){
				result = 0;
			}
			else {
				result = 1;
			}
		} if(parse.get(j) < -1000000 || parse.get(j) > 1000000){
				result = 0;
			}
			else {
				result = 1;
			} parse.get(j) < -1000000 || parse.get(j) > 1000000 parse.get(j) < -1000000 parse.get(j) parse.get parse j -1000000 1000000 parse.get(j) > 1000000 parse.get(j) parse.get parse j 1000000 {
				result = 0;
			} result = 0 result 0 {
				result = 1;
			} result = 1 result 1 return result; result ArrayList<Integer> parse parse public static void main(String[] args){
		/**
		 * ?????°?????£?¨?
		 */
		int n=0;
		int a=0,b=0; //int????????¨?????°
		long sum = 0;
		String str;
		/**
		 * ???????????£?¨?
		 */
		ArrayList<String> st = new ArrayList<String>();
		ArrayList<Integer> parse = new ArrayList<Integer>();
		/**
		 * ?????????????????\?????¨????????????????´?
		 */
		Scanner scan = new Scanner(System.in);
		n = scan.nextInt(); //????????°
		for(int i = 0;i < n; ++i){
			st.add(scan.next());
			parse.add(Integer.parseInt(st.get(i))); //int????????¨int????????????????´?
			sum += parse.get(i); // ????¨????
		}
		Collections.sort(parse); //int???????????????????????????
		if(exception(parse) == 0){
			System.out.println("??\??????????????§???.???????????????.");
		}
		else if(exception(parse) == 1){
		System.out.println(parse.get(0)+" "+parse.get(n-1)+" "+sum);
		}
	} main {
		/**
		 * ?????°?????£?¨?
		 */
		int n=0;
		int a=0,b=0; //int????????¨?????°
		long sum = 0;
		String str;
		/**
		 * ???????????£?¨?
		 */
		ArrayList<String> st = new ArrayList<String>();
		ArrayList<Integer> parse = new ArrayList<Integer>();
		/**
		 * ?????????????????\?????¨????????????????´?
		 */
		Scanner scan = new Scanner(System.in);
		n = scan.nextInt(); //????????°
		for(int i = 0;i < n; ++i){
			st.add(scan.next());
			parse.add(Integer.parseInt(st.get(i))); //int????????¨int????????????????´?
			sum += parse.get(i); // ????¨????
		}
		Collections.sort(parse); //int???????????????????????????
		if(exception(parse) == 0){
			System.out.println("??\??????????????§???.???????????????.");
		}
		else if(exception(parse) == 1){
		System.out.println(parse.get(0)+" "+parse.get(n-1)+" "+sum);
		}
	} int n=0; n 0 int a=0 a 0 b=0; b 0 long sum = 0; sum 0 String str; str ArrayList<String> st = new ArrayList<String>(); st new ArrayList<String>() ArrayList<Integer> parse = new ArrayList<Integer>(); parse new ArrayList<Integer>() Scanner scan = new Scanner(System.in); scan new Scanner(System.in) n = scan.nextInt() n scan.nextInt() scan.nextInt scan for(int i = 0;i < n; ++i){
			st.add(scan.next());
			parse.add(Integer.parseInt(st.get(i))); //int????????¨int????????????????´?
			sum += parse.get(i); // ????¨????
		} int i = 0; int i = 0; i 0 i < n i n ++i ++i i {
			st.add(scan.next());
			parse.add(Integer.parseInt(st.get(i))); //int????????¨int????????????????´?
			sum += parse.get(i); // ????¨????
		} {
			st.add(scan.next());
			parse.add(Integer.parseInt(st.get(i))); //int????????¨int????????????????´?
			sum += parse.get(i); // ????¨????
		} st.add(scan.next()) st.add st scan.next() scan.next scan parse.add(Integer.parseInt(st.get(i))) parse.add parse Integer.parseInt(st.get(i)) Integer.parseInt Integer st.get(i) st.get st i sum += parse.get(i) sum parse.get(i) parse.get parse i Collections.sort(parse) Collections.sort Collections parse if(exception(parse) == 0){
			System.out.println("??\??????????????§???.???????????????.");
		}
		else if(exception(parse) == 1){
		System.out.println(parse.get(0)+" "+parse.get(n-1)+" "+sum);
		} exception(parse) == 0 exception(parse) exception parse 0 {
			System.out.println("??\??????????????§???.???????????????.");
		} System.out.println("??\??????????????§???.???????????????.") System.out.println System.out System System.out "??\??????????????§???.???????????????." if(exception(parse) == 1){
		System.out.println(parse.get(0)+" "+parse.get(n-1)+" "+sum);
		} exception(parse) == 1 exception(parse) exception parse 1 {
		System.out.println(parse.get(0)+" "+parse.get(n-1)+" "+sum);
		} System.out.println(parse.get(0)+" "+parse.get(n-1)+" "+sum) System.out.println System.out System System.out parse.get(0)+" "+parse.get(n-1)+" "+sum " " parse.get(n-1) parse.get(0)+" "+parse.get(n-1)+" "+sum parse.get(0) parse.get parse 0 " " parse.get(n-1) parse.get parse n-1 n 1 " " sum String[] args args public class Main {
	public static int exception(ArrayList<Integer> parse){
		int result = 0;
		for(int j = 0; j < parse.size(); ++j){
			if(parse.get(j) < -1000000 || parse.get(j) > 1000000){
				result = 0;
			}
			else {
				result = 1;
			}
		}
		return result;
	}
	public static void main(String[] args){
		/**
		 * ?????°?????£?¨?
		 */
		int n=0;
		int a=0,b=0; //int????????¨?????°
		long sum = 0;
		String str;
		/**
		 * ???????????£?¨?
		 */
		ArrayList<String> st = new ArrayList<String>();
		ArrayList<Integer> parse = new ArrayList<Integer>();
		/**
		 * ?????????????????\?????¨????????????????´?
		 */
		Scanner scan = new Scanner(System.in);
		n = scan.nextInt(); //????????°
		for(int i = 0;i < n; ++i){
			st.add(scan.next());
			parse.add(Integer.parseInt(st.get(i))); //int????????¨int????????????????´?
			sum += parse.get(i); // ????¨????
		}
		Collections.sort(parse); //int???????????????????????????
		if(exception(parse) == 0){
			System.out.println("??\??????????????§???.???????????????.");
		}
		else if(exception(parse) == 1){
		System.out.println(parse.get(0)+" "+parse.get(n-1)+" "+sum);
		}
	}

} public class Main {
	public static int exception(ArrayList<Integer> parse){
		int result = 0;
		for(int j = 0; j < parse.size(); ++j){
			if(parse.get(j) < -1000000 || parse.get(j) > 1000000){
				result = 0;
			}
			else {
				result = 1;
			}
		}
		return result;
	}
	public static void main(String[] args){
		/**
		 * ?????°?????£?¨?
		 */
		int n=0;
		int a=0,b=0; //int????????¨?????°
		long sum = 0;
		String str;
		/**
		 * ???????????£?¨?
		 */
		ArrayList<String> st = new ArrayList<String>();
		ArrayList<Integer> parse = new ArrayList<Integer>();
		/**
		 * ?????????????????\?????¨????????????????´?
		 */
		Scanner scan = new Scanner(System.in);
		n = scan.nextInt(); //????????°
		for(int i = 0;i < n; ++i){
			st.add(scan.next());
			parse.add(Integer.parseInt(st.get(i))); //int????????¨int????????????????´?
			sum += parse.get(i); // ????¨????
		}
		Collections.sort(parse); //int???????????????????????????
		if(exception(parse) == 0){
			System.out.println("??\??????????????§???.???????????????.");
		}
		else if(exception(parse) == 1){
		System.out.println(parse.get(0)+" "+parse.get(n-1)+" "+sum);
		}
	}

} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main {
	public static int exception(ArrayList<Integer> parse){
		int result = 0;
		for(int j = 0; j < parse.size(); ++j){
			if(parse.get(j) < -1000000 || parse.get(j) > 1000000){
				result = 0;
			}
			else {
				result = 1;
			}
		}
		return result;
	}
	public static void main(String[] args){
		/**
		 * ?????°?????£?¨?
		 */
		int n=0;
		int a=0,b=0; //int????????¨?????°
		long sum = 0;
		String str;
		/**
		 * ???????????£?¨?
		 */
		ArrayList<String> st = new ArrayList<String>();
		ArrayList<Integer> parse = new ArrayList<Integer>();
		/**
		 * ?????????????????\?????¨????????????????´?
		 */
		Scanner scan = new Scanner(System.in);
		n = scan.nextInt(); //????????°
		for(int i = 0;i < n; ++i){
			st.add(scan.next());
			parse.add(Integer.parseInt(st.get(i))); //int????????¨int????????????????´?
			sum += parse.get(i); // ????¨????
		}
		Collections.sort(parse); //int???????????????????????????
		if(exception(parse) == 0){
			System.out.println("??\??????????????§???.???????????????.");
		}
		else if(exception(parse) == 1){
		System.out.println(parse.get(0)+" "+parse.get(n-1)+" "+sum);
		}
	}

}