#include <stdio.h>

int main(void)
{
	int a;
	int c;
	double tmp;
	double b[1000];
	int k1, k2;

	scanf("%d", &a);

	for ( k1 = 1; k1 <= a; k1++ ) {
		scanf("%lf", &b[k1]);
	}

	for ( k1 = 1; k1 < a; k1++ ) {
		for ( k2 = 1; k2 < a; k2++ ) {
			if ( b[k2] > b[k2+1]) {
				tmp = b[k2];
				b[k2] = b[k2+1];
				b[k2+1] = tmp;
			}
		}
	}
	for ( k1 = 1; k1 <= a; k1++ ) {
		printf("%.1f ", b[k1]);
	}
	puts("");

	if ( a % 2 == 0 ) {
		c = a;
		printf("%.1f", ((b[c/2] + b[a/2+1]) / 2));
	} else {
		printf("%.1f", b[a/2+1]);
	}
	puts("");

	return 0;

}