#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 *, int, double);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main(void) {
  int k, b, n;
  double x;
  scanf("%d%d", &k, &b);
  n = k == 0 ? (b == 0 ? -1 : 0) : 1;
  x = k != 0 ? -(double)b / k : 0;
  printf("%d %lf", n, x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jne    1165 <main+0x45>
mov    -0xc(%rbp),%edx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
mov    %eax,-0x1c(%rbp)
jmp    1172 <main+0x52>
mov    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1172 <main+0x52>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     11b1 <main+0x91>
cvtsi2sdl -0xc(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    11be <main+0x9e>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    11be <main+0x9e>
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%esi
movsd  -0x18(%rbp),%xmm0
lea    0xe2e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
mov    (%rsp),%ecx
cmp    $0x1,%ecx
sbb    %esi,%esi
test   %eax,%eax
je     1160 <main+0x40>
cvtsi2sd %ecx,%xmm0
xorpd  0xeaf(%rip),%xmm0
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
mov    $0x1,%esi
jmp    1164 <main+0x44>
xorpd  %xmm0,%xmm0
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [7 x i8] c"%d %lf\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %0
%10 = load i32, i32* %3
%11 = icmp eq i32 %10, 0
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 -1, i32 0
br label %15
14: ; preds = %0
br label %15
15: ; preds = %14, %9
%16 = phi i32 [ %13, %9 ], [ 1, %14 ]
store i32 %16, i32* %4
%17 = load i32, i32* %2
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %26
19: ; preds = %15
%20 = load i32, i32* %3
%21 = sitofp i32 %20 to double
%22 = fneg double %21
%23 = load i32, i32* %2
%24 = sitofp i32 %23 to double
%25 = fdiv double %22, %24
br label %27
26: ; preds = %15
br label %27
27: ; preds = %26, %19
%28 = phi double [ %25, %19 ], [ 0.000000e+00, %26 ]
store double %28, double* %5
%29 = load i32, i32* %4
%30 = load double, double* %5
%31 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %29, double %30)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [7 x i8] c"%d %lf\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 ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = icmp eq i32 %6, 0
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 0
%10 = sext i1 %9 to i32
br i1 %7, label %16, label %11
11: ; preds = %0
%12 = sitofp i32 %8 to double
%13 = fneg double %12
%14 = sitofp i32 %6 to double
%15 = fdiv double %13, %14
br label %16
16: ; preds = %0, %11
%17 = phi i32 [ %10, %0 ], [ 1, %11 ]
%18 = phi double [ 0.000000e+00, %0 ], [ %15, %11 ]
%19 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %17, double %18)
ret i32 0
}