#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 */
double acos(double);
int /*<<< orphan*/ cos(int);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ sin(int);
int main(void) {
  const double pi = acos(-1.0);
  int n;
  scanf("%d", &n);
  printf("%lf %lf\n", sin(n / 180.0 * pi), cos(n / 180.0 * pi));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xea1(%rip),%xmm0
call   1040 <acos@plt>
movsd  %xmm0,-0x10(%rbp)
lea    0xe98(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1060 <scanf@plt>
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xe72(%rip),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sin@plt>
mov    %eax,-0x18(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xe50(%rip),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1070 <cos@plt>
mov    -0x18(%rbp),%esi
mov    %eax,%edx
lea    0xe45(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
cvtsi2sdl 0xc(%rsp),%xmm0
divsd  0xe9c(%rip),%xmm0
mulsd  0xe9c(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sin@plt>
mov    %eax,%ebx
xorps  %xmm0,%xmm0
cvtsi2sdl 0xc(%rsp),%xmm0
divsd  0xe78(%rip),%xmm0
mulsd  0xe78(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1060 <cos@plt>
lea    0xe73(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [9 x i8] c"%lf %lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca i32
store i32 0, i32* %1
%4 = call double @acos(double -1.000000e+00)
store double %4, double* %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
%7 = sitofp i32 %6 to double
%8 = fdiv double %7, 1.800000e+02
%9 = load double, double* %2
%10 = fmul double %8, %9
%11 = fptosi double %10 to i32
%12 = call i32 @sin(i32 %11)
%13 = load i32, i32* %3
%14 = sitofp i32 %13 to double
%15 = fdiv double %14, 1.800000e+02
%16 = load double, double* %2
%17 = fmul double %15, %16
%18 = fptosi double %17 to i32
%19 = call i32 @cos(i32 %18)
%20 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %12, i32 %19)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [9 x i8] c"%lf %lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = sitofp i32 %4 to double
%6 = fdiv double %5, 1.800000e+02
%7 = fmul double %6, 0x400921FB54442D18
%8 = fptosi double %7 to i32
%9 = call i32 @sin(i32 %8)
%10 = load i32, i32* %1
%11 = sitofp i32 %10 to double
%12 = fdiv double %11, 1.800000e+02
%13 = fmul double %12, 0x400921FB54442D18
%14 = fptosi double %13 to i32
%15 = call i32 @cos(i32 %14)
%16 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %9, i32 %15)
ret i32 0
}