#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 /*<<< orphan*/ scanf(char *, float, float, float, float);
int main() {
  float a1, b1, a2, b2;
  float x, y;
  scanf("%f%f%f%f", a1, b1, a2, b2);
  if ((-b2 / a2) != (-b1 / a1)) {
    x = (b2 - b1) / ((b2 * a1) - (a2 * b1));
    y = (a2 - a1) / ((b1 * a2 - b2 * a1));
    printf("(%.3f,%.3f)", x, y);
  } else
    printf("INF");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm2
movss  -0x14(%rbp),%xmm3
lea    0xeb6(%rip),%rdi
call   1040 <scanf@plt>
movss  -0x14(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
divss  -0x10(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
divss  -0x8(%rbp),%xmm1
ucomiss %xmm1,%xmm0
jne    1191 <main+0x71>
jp     1191 <main+0x71>
jmp    122e <main+0x10e>
movss  -0x14(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
movss  -0x8(%rbp),%xmm3
movss  -0x10(%rbp),%xmm2
mulss  -0xc(%rbp),%xmm2
movd   %xmm2,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm2
mulss  %xmm3,%xmm1
addss  %xmm2,%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x10(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm3
movss  -0x14(%rbp),%xmm2
mulss  -0x8(%rbp),%xmm2
movd   %xmm2,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm2
mulss  %xmm3,%xmm1
addss  %xmm2,%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x1c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xde7(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
jmp    123c <main+0x11c>
lea    0xde0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
call   1040 <scanf@plt>
lea    0xedd(%rip),%rdi
movsd  0xec4(%rip),%xmm0
movaps %xmm0,%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%f%f%f%f\00"
@.str.1 = [12 x i8] c"(%.3f,%.3f)\00"
@.str.2 = [4 x i8] c"INF\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store i32 0, i32* %1
%8 = load float, float* %2
%9 = load float, float* %3
%10 = load float, float* %4
%11 = load float, float* %5
%12 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float %8, float %9, float %10, float %11)
%13 = load float, float* %5
%14 = fneg float %13
%15 = load float, float* %4
%16 = fdiv float %14, %15
%17 = load float, float* %3
%18 = fneg float %17
%19 = load float, float* %2
%20 = fdiv float %18, %19
%21 = fcmp une float %16, %20
br i1 %21, label %22, label %50
22: ; preds = %0
%23 = load float, float* %5
%24 = load float, float* %3
%25 = fsub float %23, %24
%26 = load float, float* %5
%27 = load float, float* %2
%28 = load float, float* %4
%29 = load float, float* %3
%30 = fmul float %28, %29
%31 = fneg float %30
%32 = call float @llvm.fmuladd.f32(float %26, float %27, float %31)
%33 = fdiv float %25, %32
store float %33, float* %6
%34 = load float, float* %4
%35 = load float, float* %2
%36 = fsub float %34, %35
%37 = load float, float* %3
%38 = load float, float* %4
%39 = load float, float* %5
%40 = load float, float* %2
%41 = fmul float %39, %40
%42 = fneg float %41
%43 = call float @llvm.fmuladd.f32(float %37, float %38, float %42)
%44 = fdiv float %36, %43
store float %44, float* %7
%45 = load float, float* %6
%46 = fpext float %45 to double
%47 = load float, float* %7
%48 = fpext float %47 to double
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), double %46, double %48)
br label %52
50: ; preds = %0
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %52
52: ; preds = %50, %22
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%f%f%f%f\00"
@.str.1 = [12 x i8] c"(%.3f,%.3f)\00"
define i32 @main() {
%1 = tail call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float undef, float undef, float undef, float undef)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), double 0x7FF8000000000000, double 0x7FF8000000000000)
ret i32 0
}