#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 cos(double);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int h, v;
  scanf("%d %d", &h, &v);
  printf(
      v <= 180 ? "safe\n" : "%d\n",
      (int)(h /
            (cos(
                3.1415926535897932384626433832795028841971693993751058209749445923 *
                    v / 180.0 +
                1.5707963267948966192313216916397514420985846996875529104874722961))));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0xc(%rbp),%edx
lea    0xec7(%rip),%rax
lea    0xeba(%rip),%rcx
cmp    $0xb4,%edx
cmovle %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xe8b(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe77(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe63(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1050 <cos@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xede(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    (%rsp),%eax
cmp    $0xb5,%eax
lea    0xec8(%rip),%rcx
lea    0xec7(%rip),%rbx
cmovl  %rcx,%rbx
mov    0x4(%rsp),%ebp
cvtsi2sd %eax,%xmm0
mulsd  0xe8f(%rip),%xmm0
divsd  0xe8f(%rip),%xmm0
addsd  0xe8f(%rip),%xmm0
call   1050 <cos@plt>
mov    %eax,%ecx
mov    %ebp,%eax
cltd
idiv   %ecx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [6 x i8] c"safe\0A\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%5 = load i32, i32* %3
%6 = icmp sle i32 %5, 180
%7 = zext i1 %6 to i64
%8 = select i1 %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0)
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = sitofp i32 %10 to double
%12 = fmul double 0x400921FB54442D18, %11
%13 = fdiv double %12, 1.800000e+02
%14 = fadd double %13, 0x3FF921FB54442D18
%15 = call i32 @cos(double %14)
%16 = sdiv i32 %9, %15
%17 = call i32 @printf(i8* %8, i32 %16)
ret i32 0
}

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