import java.io.*;
import java.util.ArrayList;
import java.util.Collections;
 
public class Main {
 
    public static void main(String[] args) throws IOException {
 
        int x = 0;
        long sum = 0;
        ArrayList<Integer> num = new ArrayList<>();
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         
        for(int i = 0; i < 2; i++) {
            if(i == 0){
                String[] line = br.readLine().split(" ");
                x = Integer.parseInt(line[0]);
            }
             
            else{
                String[] line = br.readLine().split(" ");
                for(int a = 0; a < x; a++){
                    sum = sum + Integer.parseInt(line[a]);
                    num.add(Integer.parseInt(line[a]));
                }
            }
             
        }
         
        System.out.println(Collections.min(num) +" "+ Collections.max(num) +" "+ sum);
         
 
         
    }
 
} import java.io.*; io.* java import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util public class Main {
 
    public static void main(String[] args) throws IOException {
 
        int x = 0;
        long sum = 0;
        ArrayList<Integer> num = new ArrayList<>();
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         
        for(int i = 0; i < 2; i++) {
            if(i == 0){
                String[] line = br.readLine().split(" ");
                x = Integer.parseInt(line[0]);
            }
             
            else{
                String[] line = br.readLine().split(" ");
                for(int a = 0; a < x; a++){
                    sum = sum + Integer.parseInt(line[a]);
                    num.add(Integer.parseInt(line[a]));
                }
            }
             
        }
         
        System.out.println(Collections.min(num) +" "+ Collections.max(num) +" "+ sum);
         
 
         
    }
 
} Main public static void main(String[] args) throws IOException {
 
        int x = 0;
        long sum = 0;
        ArrayList<Integer> num = new ArrayList<>();
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         
        for(int i = 0; i < 2; i++) {
            if(i == 0){
                String[] line = br.readLine().split(" ");
                x = Integer.parseInt(line[0]);
            }
             
            else{
                String[] line = br.readLine().split(" ");
                for(int a = 0; a < x; a++){
                    sum = sum + Integer.parseInt(line[a]);
                    num.add(Integer.parseInt(line[a]));
                }
            }
             
        }
         
        System.out.println(Collections.min(num) +" "+ Collections.max(num) +" "+ sum);
         
 
         
    } main {
 
        int x = 0;
        long sum = 0;
        ArrayList<Integer> num = new ArrayList<>();
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         
        for(int i = 0; i < 2; i++) {
            if(i == 0){
                String[] line = br.readLine().split(" ");
                x = Integer.parseInt(line[0]);
            }
             
            else{
                String[] line = br.readLine().split(" ");
                for(int a = 0; a < x; a++){
                    sum = sum + Integer.parseInt(line[a]);
                    num.add(Integer.parseInt(line[a]));
                }
            }
             
        }
         
        System.out.println(Collections.min(num) +" "+ Collections.max(num) +" "+ sum);
         
 
         
    } int x = 0; x 0 long sum = 0; sum 0 ArrayList<Integer> num = new ArrayList<>(); num new ArrayList<>() BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) for(int i = 0; i < 2; i++) {
            if(i == 0){
                String[] line = br.readLine().split(" ");
                x = Integer.parseInt(line[0]);
            }
             
            else{
                String[] line = br.readLine().split(" ");
                for(int a = 0; a < x; a++){
                    sum = sum + Integer.parseInt(line[a]);
                    num.add(Integer.parseInt(line[a]));
                }
            }
             
        } int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
            if(i == 0){
                String[] line = br.readLine().split(" ");
                x = Integer.parseInt(line[0]);
            }
             
            else{
                String[] line = br.readLine().split(" ");
                for(int a = 0; a < x; a++){
                    sum = sum + Integer.parseInt(line[a]);
                    num.add(Integer.parseInt(line[a]));
                }
            }
             
        } {
            if(i == 0){
                String[] line = br.readLine().split(" ");
                x = Integer.parseInt(line[0]);
            }
             
            else{
                String[] line = br.readLine().split(" ");
                for(int a = 0; a < x; a++){
                    sum = sum + Integer.parseInt(line[a]);
                    num.add(Integer.parseInt(line[a]));
                }
            }
             
        } if(i == 0){
                String[] line = br.readLine().split(" ");
                x = Integer.parseInt(line[0]);
            }
             
            else{
                String[] line = br.readLine().split(" ");
                for(int a = 0; a < x; a++){
                    sum = sum + Integer.parseInt(line[a]);
                    num.add(Integer.parseInt(line[a]));
                }
            } i == 0 i 0 {
                String[] line = br.readLine().split(" ");
                x = Integer.parseInt(line[0]);
            } String[] line = br.readLine().split(" "); line br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " x = Integer.parseInt(line[0]) x Integer.parseInt(line[0]) Integer.parseInt Integer line[0] line 0 {
                String[] line = br.readLine().split(" ");
                for(int a = 0; a < x; a++){
                    sum = sum + Integer.parseInt(line[a]);
                    num.add(Integer.parseInt(line[a]));
                }
            } String[] line = br.readLine().split(" "); line br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(int a = 0; a < x; a++){
                    sum = sum + Integer.parseInt(line[a]);
                    num.add(Integer.parseInt(line[a]));
                } int a = 0; int a = 0; a 0 a < x a x a++ a++ a {
                    sum = sum + Integer.parseInt(line[a]);
                    num.add(Integer.parseInt(line[a]));
                } {
                    sum = sum + Integer.parseInt(line[a]);
                    num.add(Integer.parseInt(line[a]));
                } sum = sum + Integer.parseInt(line[a]) sum sum + Integer.parseInt(line[a]) sum Integer.parseInt(line[a]) Integer.parseInt Integer line[a] line a num.add(Integer.parseInt(line[a])) num.add num Integer.parseInt(line[a]) Integer.parseInt Integer line[a] line a System.out.println(Collections.min(num) +" "+ Collections.max(num) +" "+ sum) System.out.println System.out System System.out Collections.min(num) +" "+ Collections.max(num) +" "+ sum " " Collections.max(num) Collections.min(num) +" "+ Collections.max(num) +" "+ sum Collections.min(num) Collections.min Collections num " " Collections.max(num) Collections.max Collections num " " sum String[] args args public class Main {
 
    public static void main(String[] args) throws IOException {
 
        int x = 0;
        long sum = 0;
        ArrayList<Integer> num = new ArrayList<>();
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         
        for(int i = 0; i < 2; i++) {
            if(i == 0){
                String[] line = br.readLine().split(" ");
                x = Integer.parseInt(line[0]);
            }
             
            else{
                String[] line = br.readLine().split(" ");
                for(int a = 0; a < x; a++){
                    sum = sum + Integer.parseInt(line[a]);
                    num.add(Integer.parseInt(line[a]));
                }
            }
             
        }
         
        System.out.println(Collections.min(num) +" "+ Collections.max(num) +" "+ sum);
         
 
         
    }
 
} public class Main {
 
    public static void main(String[] args) throws IOException {
 
        int x = 0;
        long sum = 0;
        ArrayList<Integer> num = new ArrayList<>();
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         
        for(int i = 0; i < 2; i++) {
            if(i == 0){
                String[] line = br.readLine().split(" ");
                x = Integer.parseInt(line[0]);
            }
             
            else{
                String[] line = br.readLine().split(" ");
                for(int a = 0; a < x; a++){
                    sum = sum + Integer.parseInt(line[a]);
                    num.add(Integer.parseInt(line[a]));
                }
            }
             
        }
         
        System.out.println(Collections.min(num) +" "+ Collections.max(num) +" "+ sum);
         
 
         
    }
 
} Main
import java.io.*;
import java.util.ArrayList;
import java.util.Collections;
 
public class Main {
 
    public static void main(String[] args) throws IOException {
 
        int x = 0;
        long sum = 0;
        ArrayList<Integer> num = new ArrayList<>();
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         
        for(int i = 0; i < 2; i++) {
            if(i == 0){
                String[] line = br.readLine().split(" ");
                x = Integer.parseInt(line[0]);
            }
             
            else{
                String[] line = br.readLine().split(" ");
                for(int a = 0; a < x; a++){
                    sum = sum + Integer.parseInt(line[a]);
                    num.add(Integer.parseInt(line[a]));
                }
            }
             
        }
         
        System.out.println(Collections.min(num) +" "+ Collections.max(num) +" "+ sum);
         
 
         
    }
 
}