import java.util.*;
import static java.lang.System.*;
public class main{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
while(sc.hasNextInt())
{
int n = sc.nextInt();
int[] datas = new int[n];
for(int i = 0; i < n; i++)
datas[i] = sc.nextInt();
Arrays.sort(datas);
int mid = datas[(n - 1) / 2];
int mid2 = datas[n / 2];
int count = 0;
for(int i = 0; i < n; i++)
if(datas[i] == mid || datas[i] == mid2)
count++;
System.out.printf("%d %d %d\r\n", mid, count, mid2 - mid + 1);
}
}
};
留言
張貼留言