#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 gcd(int, int);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *, double *);
int main() {
  int n;
  double m;
  scanf("%d%lf", &n, &m);
  for (int i = 1; i <= n; ++i)
    for (int ii = 1; ii < n; ++ii)
      if (gcd(i, ii) == 1 && (double)ii / i <= m && i != ii)
        printf("%d/%d\n", ii, i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1040 <scanf@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11ee <main+0xbe>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11db <main+0xab>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1050 <gcd@plt>
cmp    $0x1,%eax
jne    11c8 <main+0x98>
cvtsi2sdl -0x18(%rbp),%xmm1
cvtsi2sdl -0x14(%rbp),%xmm0
divsd  %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     11c8 <main+0x98>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
je     11c8 <main+0x98>
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xe43(%rip),%rdi
call   1030 <printf@plt>
jmp    11cd <main+0x9d>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    116d <main+0x3d>
jmp    11e0 <main+0xb0>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    115a <main+0x2a>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xebe(%rip),%rdi
lea    0x4(%rsp),%rsi
lea    0x10(%rsp),%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
test   %eax,%eax
jle    11eb <main+0xbb>
mov    $0x1,%r15d
xor    %r12d,%r12d
lea    0xe99(%rip),%r14
jmp    1180 <main+0x50>
nop
lea    0x1(%r15),%ecx
add    $0xffffffff,%r12d
cmp    %eax,%r15d
mov    %ecx,%r15d
jge    11eb <main+0xbb>
cmp    $0x2,%eax
jl     1170 <main+0x40>
xorps  %xmm0,%xmm0
cvtsi2sd %r15d,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%ebx
jmp    11ab <main+0x7b>
nopw   0x0(%rax,%rax,1)
add    $0x1,%ebx
mov    0x4(%rsp),%eax
cmp    %eax,%ebx
jge    1170 <main+0x40>
mov    %r15d,%edi
mov    %ebx,%esi
call   1050 <gcd@plt>
cmp    $0x1,%eax
jne    11a0 <main+0x70>
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
divsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
ucomisd %xmm0,%xmm1
jb     11a0 <main+0x70>
lea    (%r12,%rbx,1),%eax
cmp    $0x1,%eax
je     11a0 <main+0x70>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %r15d,%edx
call   1030 <printf@plt>
jmp    11a0 <main+0x70>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d%lf\00"
@.str.1 = [7 x i8] c"%d/%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, double* %3)
store i32 1, i32* %4
br label %7
7: ; preds = %42, %0
%8 = load i32, i32* %4
%9 = load i32, i32* %2
%10 = icmp sle i32 %8, %9
br i1 %10, label %11, label %45
11: ; preds = %7
store i32 1, i32* %5
br label %12
12: ; preds = %38, %11
%13 = load i32, i32* %5
%14 = load i32, i32* %2
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %41
16: ; preds = %12
%17 = load i32, i32* %4
%18 = load i32, i32* %5
%19 = call i32 @gcd(i32 %17, i32 %18)
%20 = icmp eq i32 %19, 1
br i1 %20, label %21, label %37
21: ; preds = %16
%22 = load i32, i32* %5
%23 = sitofp i32 %22 to double
%24 = load i32, i32* %4
%25 = sitofp i32 %24 to double
%26 = fdiv double %23, %25
%27 = load double, double* %3
%28 = fcmp ole double %26, %27
br i1 %28, label %29, label %37
29: ; preds = %21
%30 = load i32, i32* %4
%31 = load i32, i32* %5
%32 = icmp ne i32 %30, %31
br i1 %32, label %33, label %37
33: ; preds = %29
%34 = load i32, i32* %5
%35 = load i32, i32* %4
%36 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %34, i32 %35)
br label %37
37: ; preds = %33, %29, %21, %16
br label %38
38: ; preds = %37
%39 = load i32, i32* %5
%40 = add nsw i32 %39, 1
store i32 %40, i32* %5
br label %12
41: ; preds = %12
br label %42
42: ; preds = %41
%43 = load i32, i32* %4
%44 = add nsw i32 %43, 1
store i32 %44, i32* %4
br label %7
45: ; preds = %7
%46 = load i32, i32* %1
ret i32 %46
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d%lf\00"
@.str.1 = [7 x i8] c"%d/%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = bitcast i32* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, double* %2)
%6 = load i32, i32* %1
%7 = icmp slt i32 %6, 1
br i1 %7, label %14, label %8
8: ; preds = %0, %15
%9 = phi i32 [ %16, %15 ], [ %6, %0 ]
%10 = phi i32 [ %17, %15 ], [ 1, %0 ]
%11 = icmp sgt i32 %9, 1
br i1 %11, label %12, label %15
12: ; preds = %8
%13 = sitofp i32 %10 to double
br label %19
14: ; preds = %15, %0
ret i32 0
15: ; preds = %32, %8
%16 = phi i32 [ %9, %8 ], [ %34, %32 ]
%17 = add nuw nsw i32 %10, 1
%18 = icmp slt i32 %10, %16
br i1 %18, label %8, label %14
19: ; preds = %12, %32
%20 = phi i32 [ 1, %12 ], [ %33, %32 ]
%21 = call i32 @gcd(i32 %10, i32 %20)
%22 = icmp eq i32 %21, 1
br i1 %22, label %23, label %32
23: ; preds = %19
%24 = sitofp i32 %20 to double
%25 = fdiv double %24, %13
%26 = load double, double* %2
%27 = fcmp ugt double %25, %26
%28 = icmp eq i32 %10, %20
%29 = select i1 %27, i1 true, i1 %28
br i1 %29, label %32, label %30
30: ; preds = %23
%31 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %20, i32 %10)
br label %32
32: ; preds = %19, %23, %30
%33 = add nuw nsw i32 %20, 1
%34 = load i32, i32* %1
%35 = icmp slt i32 %33, %34
br i1 %35, label %19, label %15
}