using System.Collections.Generic;
public static void Main()
List<int> chisla = new List<int>();
int k = Convert.ToInt32(Console.ReadLine());;
k = Convert.ToInt32(Console.ReadLine());
int max = Int32.MinValue;
int min = Int32.MaxValue;
foreach (int i in chisla){
for (int i = 0; i < chisla.Count; i++){
if ((chisla[i] == max) || (chisla[i] == min))