import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) {

		//?????£?????????
		String line;

		int numN = 0;
		int numMin = 0;
		int numMax = 0;
		long numAdd = 0;

		String[] NumWork;
		int[]   NumList;
		try {
			//??\????????????
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			line = br.readLine();

			//???????????£?¨?
			numN    = Integer.parseInt(line);
			NumList = new int[numN];

			//System.out.println(numN);
			while (true) {
				//?????????????????????
				line = br.readLine();
				if(line != null){

					//??°??£?????´??°?????????
					NumWork = line.split(" ", 0);

					//??´??°?????°??????
					for (int i = 0; i < NumWork.length; i++) {
						NumList[i] = Integer.parseInt(NumWork[i]);
					}
					//System.out.println(NumList[0] + "+" +  NumList[1]);

					numMin = NumList[0];
					numMax = NumList[0];
					//??´??°?????????
					for (int i = 1; i < NumList.length; i++) {

							numMin = Math.min(NumList[i], numMin);
							numMax = Math.max(NumList[i], numMax);
					}
					//??´??°???????¨?
					for (int i = 0; i < NumList.length; i++) {
						numAdd = numAdd + NumList[i];
					}
					//???????????????
					System.out.println(numMin + " " + numMax + " " + numAdd);
				}else{
					break;
				}
			}
		}catch (NumberFormatException e) {
			System.out.println(e);
		} catch (IOException e) {
			System.out.println(e);
		}
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) {

		//?????£?????????
		String line;

		int numN = 0;
		int numMin = 0;
		int numMax = 0;
		long numAdd = 0;

		String[] NumWork;
		int[]   NumList;
		try {
			//??\????????????
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			line = br.readLine();

			//???????????£?¨?
			numN    = Integer.parseInt(line);
			NumList = new int[numN];

			//System.out.println(numN);
			while (true) {
				//?????????????????????
				line = br.readLine();
				if(line != null){

					//??°??£?????´??°?????????
					NumWork = line.split(" ", 0);

					//??´??°?????°??????
					for (int i = 0; i < NumWork.length; i++) {
						NumList[i] = Integer.parseInt(NumWork[i]);
					}
					//System.out.println(NumList[0] + "+" +  NumList[1]);

					numMin = NumList[0];
					numMax = NumList[0];
					//??´??°?????????
					for (int i = 1; i < NumList.length; i++) {

							numMin = Math.min(NumList[i], numMin);
							numMax = Math.max(NumList[i], numMax);
					}
					//??´??°???????¨?
					for (int i = 0; i < NumList.length; i++) {
						numAdd = numAdd + NumList[i];
					}
					//???????????????
					System.out.println(numMin + " " + numMax + " " + numAdd);
				}else{
					break;
				}
			}
		}catch (NumberFormatException e) {
			System.out.println(e);
		} catch (IOException e) {
			System.out.println(e);
		}
	}

} Main public static void main(String[] args) {

		//?????£?????????
		String line;

		int numN = 0;
		int numMin = 0;
		int numMax = 0;
		long numAdd = 0;

		String[] NumWork;
		int[]   NumList;
		try {
			//??\????????????
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			line = br.readLine();

			//???????????£?¨?
			numN    = Integer.parseInt(line);
			NumList = new int[numN];

			//System.out.println(numN);
			while (true) {
				//?????????????????????
				line = br.readLine();
				if(line != null){

					//??°??£?????´??°?????????
					NumWork = line.split(" ", 0);

					//??´??°?????°??????
					for (int i = 0; i < NumWork.length; i++) {
						NumList[i] = Integer.parseInt(NumWork[i]);
					}
					//System.out.println(NumList[0] + "+" +  NumList[1]);

					numMin = NumList[0];
					numMax = NumList[0];
					//??´??°?????????
					for (int i = 1; i < NumList.length; i++) {

							numMin = Math.min(NumList[i], numMin);
							numMax = Math.max(NumList[i], numMax);
					}
					//??´??°???????¨?
					for (int i = 0; i < NumList.length; i++) {
						numAdd = numAdd + NumList[i];
					}
					//???????????????
					System.out.println(numMin + " " + numMax + " " + numAdd);
				}else{
					break;
				}
			}
		}catch (NumberFormatException e) {
			System.out.println(e);
		} catch (IOException e) {
			System.out.println(e);
		}
	} main {

		//?????£?????????
		String line;

		int numN = 0;
		int numMin = 0;
		int numMax = 0;
		long numAdd = 0;

		String[] NumWork;
		int[]   NumList;
		try {
			//??\????????????
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			line = br.readLine();

			//???????????£?¨?
			numN    = Integer.parseInt(line);
			NumList = new int[numN];

			//System.out.println(numN);
			while (true) {
				//?????????????????????
				line = br.readLine();
				if(line != null){

					//??°??£?????´??°?????????
					NumWork = line.split(" ", 0);

					//??´??°?????°??????
					for (int i = 0; i < NumWork.length; i++) {
						NumList[i] = Integer.parseInt(NumWork[i]);
					}
					//System.out.println(NumList[0] + "+" +  NumList[1]);

					numMin = NumList[0];
					numMax = NumList[0];
					//??´??°?????????
					for (int i = 1; i < NumList.length; i++) {

							numMin = Math.min(NumList[i], numMin);
							numMax = Math.max(NumList[i], numMax);
					}
					//??´??°???????¨?
					for (int i = 0; i < NumList.length; i++) {
						numAdd = numAdd + NumList[i];
					}
					//???????????????
					System.out.println(numMin + " " + numMax + " " + numAdd);
				}else{
					break;
				}
			}
		}catch (NumberFormatException e) {
			System.out.println(e);
		} catch (IOException e) {
			System.out.println(e);
		}
	} String line; line int numN = 0; numN 0 int numMin = 0; numMin 0 int numMax = 0; numMax 0 long numAdd = 0; numAdd 0 String[] NumWork; NumWork int[]   NumList; NumList try {
			//??\????????????
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			line = br.readLine();

			//???????????£?¨?
			numN    = Integer.parseInt(line);
			NumList = new int[numN];

			//System.out.println(numN);
			while (true) {
				//?????????????????????
				line = br.readLine();
				if(line != null){

					//??°??£?????´??°?????????
					NumWork = line.split(" ", 0);

					//??´??°?????°??????
					for (int i = 0; i < NumWork.length; i++) {
						NumList[i] = Integer.parseInt(NumWork[i]);
					}
					//System.out.println(NumList[0] + "+" +  NumList[1]);

					numMin = NumList[0];
					numMax = NumList[0];
					//??´??°?????????
					for (int i = 1; i < NumList.length; i++) {

							numMin = Math.min(NumList[i], numMin);
							numMax = Math.max(NumList[i], numMax);
					}
					//??´??°???????¨?
					for (int i = 0; i < NumList.length; i++) {
						numAdd = numAdd + NumList[i];
					}
					//???????????????
					System.out.println(numMin + " " + numMax + " " + numAdd);
				}else{
					break;
				}
			}
		}catch (NumberFormatException e) {
			System.out.println(e);
		} catch (IOException e) {
			System.out.println(e);
		} catch (NumberFormatException e) {
			System.out.println(e);
		} NumberFormatException e {
			System.out.println(e);
		} System.out.println(e) System.out.println System.out System System.out e catch (IOException e) {
			System.out.println(e);
		} IOException e {
			System.out.println(e);
		} System.out.println(e) System.out.println System.out System System.out e {
			//??\????????????
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			line = br.readLine();

			//???????????£?¨?
			numN    = Integer.parseInt(line);
			NumList = new int[numN];

			//System.out.println(numN);
			while (true) {
				//?????????????????????
				line = br.readLine();
				if(line != null){

					//??°??£?????´??°?????????
					NumWork = line.split(" ", 0);

					//??´??°?????°??????
					for (int i = 0; i < NumWork.length; i++) {
						NumList[i] = Integer.parseInt(NumWork[i]);
					}
					//System.out.println(NumList[0] + "+" +  NumList[1]);

					numMin = NumList[0];
					numMax = NumList[0];
					//??´??°?????????
					for (int i = 1; i < NumList.length; i++) {

							numMin = Math.min(NumList[i], numMin);
							numMax = Math.max(NumList[i], numMax);
					}
					//??´??°???????¨?
					for (int i = 0; i < NumList.length; i++) {
						numAdd = numAdd + NumList[i];
					}
					//???????????????
					System.out.println(numMin + " " + numMax + " " + numAdd);
				}else{
					break;
				}
			}
		} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) line = br.readLine() line br.readLine() br.readLine br numN    = Integer.parseInt(line) numN Integer.parseInt(line) Integer.parseInt Integer line NumList = new int[numN] NumList new int[numN] numN while (true) {
				//?????????????????????
				line = br.readLine();
				if(line != null){

					//??°??£?????´??°?????????
					NumWork = line.split(" ", 0);

					//??´??°?????°??????
					for (int i = 0; i < NumWork.length; i++) {
						NumList[i] = Integer.parseInt(NumWork[i]);
					}
					//System.out.println(NumList[0] + "+" +  NumList[1]);

					numMin = NumList[0];
					numMax = NumList[0];
					//??´??°?????????
					for (int i = 1; i < NumList.length; i++) {

							numMin = Math.min(NumList[i], numMin);
							numMax = Math.max(NumList[i], numMax);
					}
					//??´??°???????¨?
					for (int i = 0; i < NumList.length; i++) {
						numAdd = numAdd + NumList[i];
					}
					//???????????????
					System.out.println(numMin + " " + numMax + " " + numAdd);
				}else{
					break;
				}
			} true {
				//?????????????????????
				line = br.readLine();
				if(line != null){

					//??°??£?????´??°?????????
					NumWork = line.split(" ", 0);

					//??´??°?????°??????
					for (int i = 0; i < NumWork.length; i++) {
						NumList[i] = Integer.parseInt(NumWork[i]);
					}
					//System.out.println(NumList[0] + "+" +  NumList[1]);

					numMin = NumList[0];
					numMax = NumList[0];
					//??´??°?????????
					for (int i = 1; i < NumList.length; i++) {

							numMin = Math.min(NumList[i], numMin);
							numMax = Math.max(NumList[i], numMax);
					}
					//??´??°???????¨?
					for (int i = 0; i < NumList.length; i++) {
						numAdd = numAdd + NumList[i];
					}
					//???????????????
					System.out.println(numMin + " " + numMax + " " + numAdd);
				}else{
					break;
				}
			} line = br.readLine() line br.readLine() br.readLine br if(line != null){

					//??°??£?????´??°?????????
					NumWork = line.split(" ", 0);

					//??´??°?????°??????
					for (int i = 0; i < NumWork.length; i++) {
						NumList[i] = Integer.parseInt(NumWork[i]);
					}
					//System.out.println(NumList[0] + "+" +  NumList[1]);

					numMin = NumList[0];
					numMax = NumList[0];
					//??´??°?????????
					for (int i = 1; i < NumList.length; i++) {

							numMin = Math.min(NumList[i], numMin);
							numMax = Math.max(NumList[i], numMax);
					}
					//??´??°???????¨?
					for (int i = 0; i < NumList.length; i++) {
						numAdd = numAdd + NumList[i];
					}
					//???????????????
					System.out.println(numMin + " " + numMax + " " + numAdd);
				}else{
					break;
				} line != null line null {

					//??°??£?????´??°?????????
					NumWork = line.split(" ", 0);

					//??´??°?????°??????
					for (int i = 0; i < NumWork.length; i++) {
						NumList[i] = Integer.parseInt(NumWork[i]);
					}
					//System.out.println(NumList[0] + "+" +  NumList[1]);

					numMin = NumList[0];
					numMax = NumList[0];
					//??´??°?????????
					for (int i = 1; i < NumList.length; i++) {

							numMin = Math.min(NumList[i], numMin);
							numMax = Math.max(NumList[i], numMax);
					}
					//??´??°???????¨?
					for (int i = 0; i < NumList.length; i++) {
						numAdd = numAdd + NumList[i];
					}
					//???????????????
					System.out.println(numMin + " " + numMax + " " + numAdd);
				} NumWork = line.split(" ", 0) NumWork line.split(" ", 0) line.split line " " 0 for (int i = 0; i < NumWork.length; i++) {
						NumList[i] = Integer.parseInt(NumWork[i]);
					} int i = 0; int i = 0; i 0 i < NumWork.length i NumWork.length NumWork NumWork.length i++ i++ i {
						NumList[i] = Integer.parseInt(NumWork[i]);
					} {
						NumList[i] = Integer.parseInt(NumWork[i]);
					} NumList[i] = Integer.parseInt(NumWork[i]) NumList[i] NumList i Integer.parseInt(NumWork[i]) Integer.parseInt Integer NumWork[i] NumWork i numMin = NumList[0] numMin NumList[0] NumList 0 numMax = NumList[0] numMax NumList[0] NumList 0 for (int i = 1; i < NumList.length; i++) {

							numMin = Math.min(NumList[i], numMin);
							numMax = Math.max(NumList[i], numMax);
					} int i = 1; int i = 1; i 1 i < NumList.length i NumList.length NumList NumList.length i++ i++ i {

							numMin = Math.min(NumList[i], numMin);
							numMax = Math.max(NumList[i], numMax);
					} {

							numMin = Math.min(NumList[i], numMin);
							numMax = Math.max(NumList[i], numMax);
					} numMin = Math.min(NumList[i], numMin) numMin Math.min(NumList[i], numMin) Math.min Math NumList[i] NumList i numMin numMax = Math.max(NumList[i], numMax) numMax Math.max(NumList[i], numMax) Math.max Math NumList[i] NumList i numMax for (int i = 0; i < NumList.length; i++) {
						numAdd = numAdd + NumList[i];
					} int i = 0; int i = 0; i 0 i < NumList.length i NumList.length NumList NumList.length i++ i++ i {
						numAdd = numAdd + NumList[i];
					} {
						numAdd = numAdd + NumList[i];
					} numAdd = numAdd + NumList[i] numAdd numAdd + NumList[i] numAdd NumList[i] NumList i System.out.println(numMin + " " + numMax + " " + numAdd) System.out.println System.out System System.out numMin + " " + numMax + " " + numAdd " " numMax numMin + " " + numMax + " " + numAdd numMin " " numMax " " numAdd {
					break;
				} break; String[] args args public class Main {

	public static void main(String[] args) {

		//?????£?????????
		String line;

		int numN = 0;
		int numMin = 0;
		int numMax = 0;
		long numAdd = 0;

		String[] NumWork;
		int[]   NumList;
		try {
			//??\????????????
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			line = br.readLine();

			//???????????£?¨?
			numN    = Integer.parseInt(line);
			NumList = new int[numN];

			//System.out.println(numN);
			while (true) {
				//?????????????????????
				line = br.readLine();
				if(line != null){

					//??°??£?????´??°?????????
					NumWork = line.split(" ", 0);

					//??´??°?????°??????
					for (int i = 0; i < NumWork.length; i++) {
						NumList[i] = Integer.parseInt(NumWork[i]);
					}
					//System.out.println(NumList[0] + "+" +  NumList[1]);

					numMin = NumList[0];
					numMax = NumList[0];
					//??´??°?????????
					for (int i = 1; i < NumList.length; i++) {

							numMin = Math.min(NumList[i], numMin);
							numMax = Math.max(NumList[i], numMax);
					}
					//??´??°???????¨?
					for (int i = 0; i < NumList.length; i++) {
						numAdd = numAdd + NumList[i];
					}
					//???????????????
					System.out.println(numMin + " " + numMax + " " + numAdd);
				}else{
					break;
				}
			}
		}catch (NumberFormatException e) {
			System.out.println(e);
		} catch (IOException e) {
			System.out.println(e);
		}
	}

} public class Main {

	public static void main(String[] args) {

		//?????£?????????
		String line;

		int numN = 0;
		int numMin = 0;
		int numMax = 0;
		long numAdd = 0;

		String[] NumWork;
		int[]   NumList;
		try {
			//??\????????????
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			line = br.readLine();

			//???????????£?¨?
			numN    = Integer.parseInt(line);
			NumList = new int[numN];

			//System.out.println(numN);
			while (true) {
				//?????????????????????
				line = br.readLine();
				if(line != null){

					//??°??£?????´??°?????????
					NumWork = line.split(" ", 0);

					//??´??°?????°??????
					for (int i = 0; i < NumWork.length; i++) {
						NumList[i] = Integer.parseInt(NumWork[i]);
					}
					//System.out.println(NumList[0] + "+" +  NumList[1]);

					numMin = NumList[0];
					numMax = NumList[0];
					//??´??°?????????
					for (int i = 1; i < NumList.length; i++) {

							numMin = Math.min(NumList[i], numMin);
							numMax = Math.max(NumList[i], numMax);
					}
					//??´??°???????¨?
					for (int i = 0; i < NumList.length; i++) {
						numAdd = numAdd + NumList[i];
					}
					//???????????????
					System.out.println(numMin + " " + numMax + " " + numAdd);
				}else{
					break;
				}
			}
		}catch (NumberFormatException e) {
			System.out.println(e);
		} catch (IOException e) {
			System.out.println(e);
		}
	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) {

		//?????£?????????
		String line;

		int numN = 0;
		int numMin = 0;
		int numMax = 0;
		long numAdd = 0;

		String[] NumWork;
		int[]   NumList;
		try {
			//??\????????????
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			line = br.readLine();

			//???????????£?¨?
			numN    = Integer.parseInt(line);
			NumList = new int[numN];

			//System.out.println(numN);
			while (true) {
				//?????????????????????
				line = br.readLine();
				if(line != null){

					//??°??£?????´??°?????????
					NumWork = line.split(" ", 0);

					//??´??°?????°??????
					for (int i = 0; i < NumWork.length; i++) {
						NumList[i] = Integer.parseInt(NumWork[i]);
					}
					//System.out.println(NumList[0] + "+" +  NumList[1]);

					numMin = NumList[0];
					numMax = NumList[0];
					//??´??°?????????
					for (int i = 1; i < NumList.length; i++) {

							numMin = Math.min(NumList[i], numMin);
							numMax = Math.max(NumList[i], numMax);
					}
					//??´??°???????¨?
					for (int i = 0; i < NumList.length; i++) {
						numAdd = numAdd + NumList[i];
					}
					//???????????????
					System.out.println(numMin + " " + numMax + " " + numAdd);
				}else{
					break;
				}
			}
		}catch (NumberFormatException e) {
			System.out.println(e);
		} catch (IOException e) {
			System.out.println(e);
		}
	}

}