#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 a, b, c, d, x, y;
  scanf("%f%f%f%f", a, b, c, d);
  x = (d - b) / (a * d - b * c);
  y = (a * d - b * c - d * c + b * c) / (a * d * d - b * c * d);
  if ((a * d - b * c) == 0 || (a * d * d - b * c * d) == 0)
    printf("INF");
  else {
    printf("(%.3f,%.3f)", x, y);
  }
  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
subss  -0xc(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0x14(%rbp),%xmm3
movss  -0xc(%rbp),%xmm2
mulss  -0x10(%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  -0x8(%rbp),%xmm0
movss  -0x14(%rbp),%xmm2
movss  -0xc(%rbp),%xmm1
mulss  -0x10(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  -0x14(%rbp),%xmm1
movss  -0x10(%rbp),%xmm2
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
mulss  -0x14(%rbp),%xmm1
movss  -0x14(%rbp),%xmm3
movss  -0xc(%rbp),%xmm2
mulss  -0x10(%rbp),%xmm2
mulss  -0x14(%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  -0x8(%rbp),%xmm0
movss  -0x14(%rbp),%xmm2
movss  -0xc(%rbp),%xmm1
mulss  -0x10(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1261 <main+0x141>
jp     1261 <main+0x141>
jmp    12a6 <main+0x186>
movss  -0x8(%rbp),%xmm0
mulss  -0x14(%rbp),%xmm0
movss  -0x14(%rbp),%xmm2
movss  -0xc(%rbp),%xmm1
mulss  -0x10(%rbp),%xmm1
mulss  -0x14(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    12b9 <main+0x199>
jp     12b9 <main+0x199>
lea    0xd5c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12d9 <main+0x1b9>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x1c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xd3b(%rip),%rdi
mov    $0x2,%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 = [4 x i8] c"INF\00"
@.str.2 = [12 x i8] c"(%.3f,%.3f)\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 = load float, float* %3
%15 = fsub float %13, %14
%16 = load float, float* %2
%17 = load float, float* %5
%18 = load float, float* %3
%19 = load float, float* %4
%20 = fmul float %18, %19
%21 = fneg float %20
%22 = call float @llvm.fmuladd.f32(float %16, float %17, float %21)
%23 = fdiv float %15, %22
store float %23, float* %6
%24 = load float, float* %2
%25 = load float, float* %5
%26 = load float, float* %3
%27 = load float, float* %4
%28 = fmul float %26, %27
%29 = fneg float %28
%30 = call float @llvm.fmuladd.f32(float %24, float %25, float %29)
%31 = load float, float* %5
%32 = load float, float* %4
%33 = fneg float %31
%34 = call float @llvm.fmuladd.f32(float %33, float %32, float %30)
%35 = load float, float* %3
%36 = load float, float* %4
%37 = call float @llvm.fmuladd.f32(float %35, float %36, float %34)
%38 = load float, float* %2
%39 = load float, float* %5
%40 = fmul float %38, %39
%41 = load float, float* %5
%42 = load float, float* %3
%43 = load float, float* %4
%44 = fmul float %42, %43
%45 = load float, float* %5
%46 = fmul float %44, %45
%47 = fneg float %46
%48 = call float @llvm.fmuladd.f32(float %40, float %41, float %47)
%49 = fdiv float %37, %48
store float %49, float* %7
%50 = load float, float* %2
%51 = load float, float* %5
%52 = load float, float* %3
%53 = load float, float* %4
%54 = fmul float %52, %53
%55 = fneg float %54
%56 = call float @llvm.fmuladd.f32(float %50, float %51, float %55)
%57 = fcmp oeq float %56, 0.000000e+00
br i1 %57, label %71, label %58
58: ; preds = %0
%59 = load float, float* %2
%60 = load float, float* %5
%61 = fmul float %59, %60
%62 = load float, float* %5
%63 = load float, float* %3
%64 = load float, float* %4
%65 = fmul float %63, %64
%66 = load float, float* %5
%67 = fmul float %65, %66
%68 = fneg float %67
%69 = call float @llvm.fmuladd.f32(float %61, float %62, float %68)
%70 = fcmp oeq float %69, 0.000000e+00
br i1 %70, label %71, label %73
71: ; preds = %58, %0
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %79
73: ; preds = %58
%74 = load float, float* %6
%75 = fpext float %74 to double
%76 = load float, float* %7
%77 = fpext float %76 to double
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), double %75, double %77)
br label %79
79: ; preds = %73, %71
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%f%f%f%f\00"
@.str.2 = [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.2, i64 0, i64 0), double 0x7FF8000000000000, double 0x7FF8000000000000)
ret i32 0
}