#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*/ feof(int /*<<< orphan*/);
unsigned long gcd(unsigned long, unsigned long);
int /*<<< orphan*/ printf(char *, unsigned long, unsigned long);
int /*<<< orphan*/ scanf(char *, unsigned long *, unsigned long *,
                         unsigned long *);
int /*<<< orphan*/ stdin;
int main(int argc, char *argv[]) {
  long unsigned int a, b, c;
  long unsigned int n, d, f;
  scanf("%lu %lu %lu", &a, &b, &c);
  while (!feof(stdin)) {
    n = a * b;
    d = c - b;
    f = gcd(n, d);
    printf("%lu/%lu\n", n / f, d / f);
    scanf("%lu %lu %lu", &a, &b, &c);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xea3(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x28(%rbp),%rcx
call   1050 <scanf@plt>
mov    0x2e73(%rip),%rax
mov    (%rax),%edi
call   1040 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1191 <main+0x51>
jmp    1202 <main+0xc2>
mov    -0x18(%rbp),%rax
imul   -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
sub    -0x20(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1060 <gcd@plt>
mov    %rax,-0x40(%rbp)
mov    -0x30(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x40(%rbp)
mov    %rax,%rsi
mov    -0x38(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x40(%rbp)
mov    %rax,%rdx
lea    0xe2c(%rip),%rdi
call   1030 <printf@plt>
lea    0xe14(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x28(%rbp),%rcx
call   1050 <scanf@plt>
jmp    116e <main+0x2e>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xeab(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rsp,%rcx
call   1050 <scanf@plt>
mov    0x2e7a(%rip),%r15
mov    (%r15),%edi
call   1040 <feof@plt>
test   %eax,%eax
je     118b <main+0x4b>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x10(%rsp),%r12
lea    0x8(%rsp),%r13
mov    %rsp,%rbx
jmp    11d8 <main+0x98>
nopw   0x0(%rax,%rax,1)
mov    %rbp,%rax
xor    %edx,%edx
div    %rcx
mov    %rax,%rdx
lea    0xe5a(%rip),%rdi
call   1030 <printf@plt>
lea    0xe42(%rip),%rdi
mov    %r12,%rsi
mov    %r13,%rdx
mov    %rbx,%rcx
call   1050 <scanf@plt>
mov    (%r15),%edi
call   1040 <feof@plt>
test   %eax,%eax
jne    117a <main+0x3a>
mov    0x8(%rsp),%rax
mov    0x10(%rsp),%r14
imul   %rax,%r14
mov    (%rsp),%rbp
sub    %rax,%rbp
mov    %r14,%rdi
mov    %rbp,%rsi
call   1060 <gcd@plt>
mov    %rax,%rcx
mov    %r14,%rax
or     %rcx,%rax
shr    $0x20,%rax
je     1220 <main+0xe0>
mov    %r14,%rax
xor    %edx,%edx
div    %rcx
mov    %rax,%rsi
jmp    1229 <main+0xe9>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14d,%eax
xor    %edx,%edx
div    %ecx
mov    %eax,%esi
mov    %rcx,%rax
or     %rbp,%rax
shr    $0x20,%rax
jne    11a0 <main+0x60>
mov    %ebp,%eax
xor    %edx,%edx
div    %ecx
mov    %eax,%edx
jmp    11ab <main+0x6b>

LLVM IR (-O0):
@.str = [12 x i8] c"%lu %lu %lu\00"
@stdin = global i32 0
@.str.1 = [9 x i8] c"%lu/%lu\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%12 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64* %6, i64* %7, i64* %8)
br label %13
13: ; preds = %18, %2
%14 = load i32, i32* @stdin
%15 = call i32 @feof(i32 %14)
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
br i1 %17, label %18, label %36
18: ; preds = %13
%19 = load i64, i64* %6
%20 = load i64, i64* %7
%21 = mul i64 %19, %20
store i64 %21, i64* %9
%22 = load i64, i64* %8
%23 = load i64, i64* %7
%24 = sub i64 %22, %23
store i64 %24, i64* %10
%25 = load i64, i64* %9
%26 = load i64, i64* %10
%27 = call i64 @gcd(i64 %25, i64 %26)
store i64 %27, i64* %11
%28 = load i64, i64* %9
%29 = load i64, i64* %11
%30 = udiv i64 %28, %29
%31 = load i64, i64* %10
%32 = load i64, i64* %11
%33 = udiv i64 %31, %32
%34 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64 %30, i64 %33)
%35 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64* %6, i64* %7, i64* %8)
br label %13
36: ; preds = %13
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%lu %lu %lu\00"
@stdin = global i32 0
@.str.1 = [9 x i8] c"%lu/%lu\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = bitcast i64* %3 to i8*
%7 = bitcast i64* %4 to i8*
%8 = bitcast i64* %5 to i8*
%9 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64* %3, i64* %4, i64* %5)
%10 = load i32, i32* @stdin
%11 = call i32 @feof(i32 %10)
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %27
13: ; preds = %2, %13
%14 = load i64, i64* %3
%15 = load i64, i64* %4
%16 = mul i64 %15, %14
%17 = load i64, i64* %5
%18 = sub i64 %17, %15
%19 = call i64 @gcd(i64 %16, i64 %18)
%20 = udiv i64 %16, %19
%21 = udiv i64 %18, %19
%22 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64 %20, i64 %21)
%23 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64* %3, i64* %4, i64* %5)
%24 = load i32, i32* @stdin
%25 = call i32 @feof(i32 %24)
%26 = icmp eq i32 %25, 0
br i1 %26, label %13, label %27
27: ; preds = %13, %2
ret i32 0
}