#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 */
scalar_t__ EOF;
int /*<<< orphan*/ printf(char *, long long, long long);
scalar_t__ scanf(char *, int *);
int main() {
  long long num_male[128];
  long long num_female[128];
  int year;
  int i;
  num_male[0] = 0;
  num_female[0] = 1;
  num_male[1] = 1;
  num_female[1] = 1;
  for (i = 2;; i++) {
    num_male[i] = num_male[i - 1] + num_female[i - 1];
    num_female[i] = num_male[i - 1] + 1;
    if (num_female[i] > 1LL << 32 || num_male[i] > 1LL << 32) {
      break;
    }
  }
  while (scanf("%d\n", &year) != EOF && year != -1) {
    printf("%lld %lld\n", num_male[year], num_male[year] + num_female[year]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x820,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x410(%rbp)
movq   $0x1,-0x810(%rbp)
movq   $0x1,-0x408(%rbp)
movq   $0x1,-0x808(%rbp)
movl   $0x2,-0x818(%rbp)
mov    -0x818(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x410(%rbp,%rax,8),%rcx
ff
mov    -0x818(%rbp),%eax
sub    $0x1,%eax
cltq
add    -0x810(%rbp,%rax,8),%rcx
ff
movslq -0x818(%rbp),%rax
mov    %rcx,-0x410(%rbp,%rax,8)
ff
mov    -0x818(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x410(%rbp,%rax,8),%rcx
ff
add    $0x1,%rcx
movslq -0x818(%rbp),%rax
mov    %rcx,-0x810(%rbp,%rax,8)
ff
movslq -0x818(%rbp),%rax
movabs $0x100000000,%rcx
cmp    %rcx,-0x810(%rbp,%rax,8)
ff
jg     1201 <main+0xe1>
movslq -0x818(%rbp),%rax
movabs $0x100000000,%rcx
cmp    %rcx,-0x410(%rbp,%rax,8)
ff
jle    1206 <main+0xe6>
jmp    121f <main+0xff>
jmp    120b <main+0xeb>
mov    -0x818(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x818(%rbp)
jmp    1168 <main+0x48>
jmp    1224 <main+0x104>
lea    0xdd5(%rip),%rdi
lea    -0x814(%rbp),%rsi
call   1040 <scanf@plt>
mov    %rax,%rcx
xor    %eax,%eax
mov    0x2da5(%rip),%rdx
cmp    (%rdx),%rcx
mov    %al,-0x819(%rbp)
je     1262 <main+0x142>
cmpl   $0xffffffff,-0x814(%rbp)
setne  %al
mov    %al,-0x819(%rbp)
mov    -0x819(%rbp),%al
test   $0x1,%al
jne    1275 <main+0x155>
jmp    12b3 <main+0x193>
movslq -0x814(%rbp),%rax
mov    -0x410(%rbp,%rax,8),%rsi
ff
movslq -0x814(%rbp),%rax
mov    -0x410(%rbp,%rax,8),%rdx
ff
movslq -0x814(%rbp),%rax
add    -0x810(%rbp,%rax,8),%rdx
ff
lea    0xd5b(%rip),%rdi
call   1030 <printf@plt>
jmp    1224 <main+0x104>
xor    %eax,%eax
add    $0x820,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x818,%rsp
movaps 0xecb(%rip),%xmm0
movaps %xmm0,0x410(%rsp)
movaps 0xecc(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
mov    $0x1,%esi
mov    $0x10,%eax
mov    $0xffffffff,%ecx
movabs $0x100000001,%rdx
mov    $0x1,%edi
nopw   0x0(%rax,%rax,1)
mov    %rdi,%rbx
mov    %rsi,%rdi
add    %rbx,%rdi
mov    %rdi,0x410(%rsp,%rax,1)
lea    0x1(%rbx),%rsi
mov    %rsi,0x10(%rsp,%rax,1)
cmp    %rcx,%rbx
jg     1198 <main+0x78>
add    $0x8,%rax
cmp    %rdx,%rdi
jl     1170 <main+0x50>
lea    0xe81(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x2e38(%rip),%r12
cmp    (%r12),%rax
je     1214 <main+0xf4>
mov    0xc(%rsp),%eax
cmp    $0xffffffff,%eax
je     1214 <main+0xf4>
lea    0xe5e(%rip),%r14
lea    0xe53(%rip),%r15
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cltq
mov    0x410(%rsp,%rax,8),%rsi
mov    0x10(%rsp,%rax,8),%rdx
add    %rsi,%rdx
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
cmp    (%r12),%rax
je     1214 <main+0xf4>
mov    0xc(%rsp),%eax
cmp    $0xffffffff,%eax
jne    11e0 <main+0xc0>
xor    %eax,%eax
add    $0x818,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@EOF = global i64 0
@.str.1 = [11 x i8] c"%lld %lld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [128 x i64]
%3 = alloca [128 x i64]
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = getelementptr inbounds [128 x i64], [128 x i64]* %2, i64 0, i64 0
store i64 0, i64* %6
%7 = getelementptr inbounds [128 x i64], [128 x i64]* %3, i64 0, i64 0
store i64 1, i64* %7
%8 = getelementptr inbounds [128 x i64], [128 x i64]* %2, i64 0, i64 1
store i64 1, i64* %8
%9 = getelementptr inbounds [128 x i64], [128 x i64]* %3, i64 0, i64 1
store i64 1, i64* %9
store i32 2, i32* %5
br label %10
10: ; preds = %47, %0
%11 = load i32, i32* %5
%12 = sub nsw i32 %11, 1
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [128 x i64], [128 x i64]* %2, i64 0, i64 %13
%15 = load i64, i64* %14
%16 = load i32, i32* %5
%17 = sub nsw i32 %16, 1
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [128 x i64], [128 x i64]* %3, i64 0, i64 %18
%20 = load i64, i64* %19
%21 = add nsw i64 %15, %20
%22 = load i32, i32* %5
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [128 x i64], [128 x i64]* %2, i64 0, i64 %23
store i64 %21, i64* %24
%25 = load i32, i32* %5
%26 = sub nsw i32 %25, 1
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [128 x i64], [128 x i64]* %2, i64 0, i64 %27
%29 = load i64, i64* %28
%30 = add nsw i64 %29, 1
%31 = load i32, i32* %5
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [128 x i64], [128 x i64]* %3, i64 0, i64 %32
store i64 %30, i64* %33
%34 = load i32, i32* %5
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [128 x i64], [128 x i64]* %3, i64 0, i64 %35
%37 = load i64, i64* %36
%38 = icmp sgt i64 %37, 4294967296
br i1 %38, label %45, label %39
39: ; preds = %10
%40 = load i32, i32* %5
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [128 x i64], [128 x i64]* %2, i64 0, i64 %41
%43 = load i64, i64* %42
%44 = icmp sgt i64 %43, 4294967296
br i1 %44, label %45, label %46
45: ; preds = %39, %10
br label %50
46: ; preds = %39
br label %47
47: ; preds = %46
%48 = load i32, i32* %5
%49 = add nsw i32 %48, 1
store i32 %49, i32* %5
br label %10
50: ; preds = %45
br label %51
51: ; preds = %60, %50
%52 = call i64 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %4)
%53 = load i64, i64* @EOF
%54 = icmp ne i64 %52, %53
br i1 %54, label %55, label %58
55: ; preds = %51
%56 = load i32, i32* %4
%57 = icmp ne i32 %56, -1
br label %58
58: ; preds = %55, %51
%59 = phi i1 [ false, %51 ], [ %57, %55 ]
br i1 %59, label %60, label %75
60: ; preds = %58
%61 = load i32, i32* %4
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [128 x i64], [128 x i64]* %2, i64 0, i64 %62
%64 = load i64, i64* %63
%65 = load i32, i32* %4
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds [128 x i64], [128 x i64]* %2, i64 0, i64 %66
%68 = load i64, i64* %67
%69 = load i32, i32* %4
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [128 x i64], [128 x i64]* %3, i64 0, i64 %70
%72 = load i64, i64* %71
%73 = add nsw i64 %68, %72
%74 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i64 %64, i64 %73)
br label %51
75: ; preds = %58
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@EOF = global i64 0
@.str.1 = [11 x i8] c"%lld %lld\0A\00"
define i32 @main() {
%1 = alloca [128 x i64]
%2 = alloca [128 x i64]
%3 = alloca i32
%4 = bitcast [128 x i64]* %1 to i8*
%5 = bitcast [128 x i64]* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = bitcast [128 x i64]* %1 to <2 x i64>*
store <2 x i64> <i64 0, i64 1>, <2 x i64>* %7
%8 = bitcast [128 x i64]* %2 to <2 x i64>*
store <2 x i64> <i64 1, i64 1>, <2 x i64>* %8
br label %9
9: ; preds = %9, %0
%10 = phi i64 [ %15, %9 ], [ 1, %0 ]
%11 = phi i64 [ %13, %9 ], [ 1, %0 ]
%12 = phi i64 [ %20, %9 ], [ 2, %0 ]
%13 = add nsw i64 %10, %11
%14 = getelementptr inbounds [128 x i64], [128 x i64]* %1, i64 0, i64 %12
store i64 %13, i64* %14
%15 = add nsw i64 %11, 1
%16 = getelementptr inbounds [128 x i64], [128 x i64]* %2, i64 0, i64 %12
store i64 %15, i64* %16
%17 = icmp sgt i64 %11, 4294967295
%18 = icmp sgt i64 %13, 4294967296
%19 = select i1 %17, i1 true, i1 %18
%20 = add nuw i64 %12, 1
br i1 %19, label %21, label %9
21: ; preds = %9
%22 = call i64 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %3)
%23 = load i64, i64* @EOF
%24 = icmp ne i64 %22, %23
%25 = load i32, i32* %3
%26 = icmp ne i32 %25, -1
%27 = select i1 %24, i1 %26, i1 false
br i1 %27, label %28, label %43
28: ; preds = %21, %28
%29 = phi i32 [ %40, %28 ], [ %25, %21 ]
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [128 x i64], [128 x i64]* %1, i64 0, i64 %30
%32 = load i64, i64* %31
%33 = getelementptr inbounds [128 x i64], [128 x i64]* %2, i64 0, i64 %30
%34 = load i64, i64* %33
%35 = add nsw i64 %34, %32
%36 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i64 %32, i64 %35)
%37 = call i64 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %3)
%38 = load i64, i64* @EOF
%39 = icmp ne i64 %37, %38
%40 = load i32, i32* %3
%41 = icmp ne i32 %40, -1
%42 = select i1 %39, i1 %41, i1 false
br i1 %42, label %28, label %43
43: ; preds = %28, %21
ret i32 0
}