#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, float, float);
int /*<<< orphan*/ scanf(char *, ...);
int main(int argc, const char *argv[]) {
  int n;
  float max, min, tmp;
  scanf("%d", &n);
  scanf("%f%f", &max, &tmp);
  if (tmp > max) {
    min = max;
    max = tmp;
  }
  for (n -= 2; n > 0; n--) {
    scanf("%f", &tmp);
    if (tmp > max)
      max = tmp;
    if (tmp < min)
      min = tmp;
  }
  printf("%.2f %.2f\n", max, min);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xeb4(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0x20(%rbp),%xmm0
ucomiss -0x18(%rbp),%xmm0
jbe    1181 <main+0x61>
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    11ef <main+0xcf>
lea    0xe6a(%rip),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0x20(%rbp),%xmm0
ucomiss -0x18(%rbp),%xmm0
jbe    11bf <main+0x9f>
movss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x20(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    11dc <main+0xbc>
movss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    11e1 <main+0xc1>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    118a <main+0x6a>
movss  -0x18(%rbp),%xmm0
movss  -0x1c(%rbp),%xmm1
lea    0xe08(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0xed2(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xec2(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0x10(%rsp),%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
movss  0x10(%rsp),%xmm1
movss  0x8(%rsp),%xmm2
ucomiss %xmm2,%xmm1
movaps %xmm2,%xmm0
jbe    116f <main+0x4f>
movss  %xmm1,0x8(%rsp)
movaps %xmm1,%xmm0
mov    0xc(%rsp),%eax
lea    -0x2(%rax),%ecx
mov    %ecx,0xc(%rsp)
cmp    $0x3,%eax
jl     11d8 <main+0xb8>
lea    0xe7f(%rip),%r14
lea    0x10(%rsp),%rbx
jmp    11a9 <main+0x89>
nopl   (%rax)
minss  0x14(%rsp),%xmm1
mov    0xc(%rsp),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,0xc(%rsp)
movaps %xmm1,%xmm2
cmp    $0x1,%eax
jle    11db <main+0xbb>
movss  %xmm2,0x14(%rsp)
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movss  0x10(%rsp),%xmm1
movss  0x8(%rsp),%xmm0
ucomiss %xmm0,%xmm1
jbe    1190 <main+0x70>
movss  %xmm1,0x8(%rsp)
movaps %xmm1,%xmm0
jmp    1190 <main+0x70>
movaps %xmm2,%xmm1
lea    0xe26(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"%f%f\00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [11 x i8] c"%.2f %.2f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca float
%8 = alloca float
%9 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), float* %7, float* %9)
%12 = load float, float* %9
%13 = load float, float* %7
%14 = fcmp ogt float %12, %13
br i1 %14, label %15, label %18
15: ; preds = %2
%16 = load float, float* %7
store float %16, float* %8
%17 = load float, float* %9
store float %17, float* %7
br label %18
18: ; preds = %15, %2
%19 = load i32, i32* %6
%20 = sub nsw i32 %19, 2
store i32 %20, i32* %6
br label %21
21: ; preds = %38, %18
%22 = load i32, i32* %6
%23 = icmp sgt i32 %22, 0
br i1 %23, label %24, label %41
24: ; preds = %21
%25 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %9)
%26 = load float, float* %9
%27 = load float, float* %7
%28 = fcmp ogt float %26, %27
br i1 %28, label %29, label %31
29: ; preds = %24
%30 = load float, float* %9
store float %30, float* %7
br label %31
31: ; preds = %29, %24
%32 = load float, float* %9
%33 = load float, float* %8
%34 = fcmp olt float %32, %33
br i1 %34, label %35, label %37
35: ; preds = %31
%36 = load float, float* %9
store float %36, float* %8
br label %37
37: ; preds = %35, %31
br label %38
38: ; preds = %37
%39 = load i32, i32* %6
%40 = add nsw i32 %39, -1
store i32 %40, i32* %6
br label %21
41: ; preds = %21
%42 = load float, float* %7
%43 = load float, float* %8
%44 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), float %42, float %43)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"%f%f\00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [11 x i8] c"%.2f %.2f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca float
%5 = alloca float
%6 = bitcast i32* %3 to i8*
%7 = bitcast float* %4 to i8*
%8 = bitcast float* %5 to i8*
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), float* %4, float* %5)
%11 = load float, float* %5
%12 = load float, float* %4
%13 = fcmp ogt float %11, %12
br i1 %13, label %14, label %15
14: ; preds = %2
store float %11, float* %4
br label %15
15: ; preds = %14, %2
%16 = phi float [ %11, %14 ], [ %12, %2 ]
%17 = load i32, i32* %3
%18 = add nsw i32 %17, -2
store i32 %18, i32* %3
%19 = icmp sgt i32 %17, 2
br i1 %19, label %20, label %34
20: ; preds = %15, %27
%21 = phi float [ %30, %27 ], [ %12, %15 ]
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %5)
%23 = load float, float* %5
%24 = load float, float* %4
%25 = fcmp ogt float %23, %24
br i1 %25, label %26, label %27
26: ; preds = %20
store float %23, float* %4
br label %27
27: ; preds = %26, %20
%28 = phi float [ %23, %26 ], [ %24, %20 ]
%29 = fcmp olt float %23, %21
%30 = select i1 %29, float %23, float %21
%31 = load i32, i32* %3
%32 = add nsw i32 %31, -1
store i32 %32, i32* %3
%33 = icmp sgt i32 %31, 1
br i1 %33, label %20, label %34
34: ; preds = %27, %15
%35 = phi float [ %16, %15 ], [ %28, %27 ]
%36 = phi float [ %12, %15 ], [ %30, %27 ]
%37 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), float %35, float %36)
ret i32 0
}