#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 *, int *);
int main() {
  int n, i;
  scanf("%d", &n);
  if (n < 4) {
    printf("NO\n");
  } else {
    if (n % 2 == 0) {
      printf("YES\n");
      printf("1 * 2 = 2\n");
      printf("2 * 3 = 6\n");
      printf("6 * 4 = 24\n");
      for (i = 5; i <= n; i += 2) {
        printf("%d - %d = 1\n", i + 1, i);
        printf("24 * 1 = 24\n");
      }
    } else {
      printf("YES\n");
      printf("1 * 2 = 2\n");
      printf("3 + 4 = 7\n");
      printf("7 + 5 = 12\n");
      printf("12 * 2 = 24\n");
      for (i = 6; i <= n; i += 2) {
        printf("%d - %d = 1\n", i + 1, i);
        printf("24 * 1 = 24\n");
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x4,-0x8(%rbp)
jge    115c <main+0x3c>
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1289 <main+0x169>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11f3 <main+0xd3>
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x5,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11ee <main+0xce>
mov    -0xc(%rbp),%esi
add    $0x1,%esi
mov    -0xc(%rbp),%edx
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe62(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
jmp    11af <main+0x8f>
jmp    1284 <main+0x164>
lea    0xe0d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe04(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe32(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe2f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe2d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x6,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     127f <main+0x15f>
mov    -0xc(%rbp),%esi
add    $0x1,%esi
mov    -0xc(%rbp),%edx
lea    0xdd2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdd1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
jmp    1240 <main+0x120>
jmp    1284 <main+0x164>
jmp    1289 <main+0x169>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xec0(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    $0x3,%eax
jg     1164 <main+0x34>
lea    0xf06(%rip),%rdi
call   1030 <puts@plt>
jmp    1260 <main+0x130>
lea    0xec6(%rip),%rdi
test   $0x1,%al
jne    11e2 <main+0xb2>
call   1030 <puts@plt>
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb6(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x5,0xc(%rsp)
jl     1260 <main+0x130>
mov    $0x5,%ebx
lea    0xe54(%rip),%r14
lea    0xe9e(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
lea    0x1(%rbx),%esi
mov    %r14,%rdi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
call   1030 <puts@plt>
add    $0x2,%ebx
cmp    0xc(%rsp),%ebx
jle    11c0 <main+0x90>
jmp    1260 <main+0x130>
call   1030 <puts@plt>
lea    0xe47(%rip),%rdi
call   1030 <puts@plt>
lea    0xe16(%rip),%rdi
call   1030 <puts@plt>
lea    0xe14(%rip),%rdi
call   1030 <puts@plt>
lea    0xe13(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x6,0xc(%rsp)
jl     1260 <main+0x130>
mov    $0x6,%ebx
lea    0xdd9(%rip),%r14
lea    0xe23(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0x1(%rbx),%esi
mov    %r14,%rdi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
call   1030 <puts@plt>
add    $0x2,%ebx
cmp    0xc(%rsp),%ebx
jle    1240 <main+0x110>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.6 = [13 x i8] c"%d - %d = 1\0A\00"
@str.12 = [10 x i8] c"3 + 4 = 7\00"
@str.13 = [11 x i8] c"7 + 5 = 12\00"
@str.14 = [12 x i8] c"12 * 2 = 24\00"
@str.16 = [4 x i8] c"YES\00"
@str.17 = [10 x i8] c"1 * 2 = 2\00"
@str.18 = [10 x i8] c"2 * 3 = 6\00"
@str.19 = [11 x i8] c"6 * 4 = 24\00"
@str.20 = [12 x i8] c"24 * 1 = 24\00"
@str.21 = [3 x i8] c"NO\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 4
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.21, i64 0, i64 0))
br label %42
8: ; preds = %0
%9 = and i32 %4, 1
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %26
11: ; preds = %8
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.16, i64 0, i64 0))
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.17, i64 0, i64 0))
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.18, i64 0, i64 0))
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.19, i64 0, i64 0))
%16 = load i32, i32* %1
%17 = icmp slt i32 %16, 5
br i1 %17, label %42, label %18
18: ; preds = %11, %18
%19 = phi i32 [ %23, %18 ], [ 5, %11 ]
%20 = add nuw nsw i32 %19, 1
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i32 %20, i32 %19)
%22 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.20, i64 0, i64 0))
%23 = add nuw nsw i32 %19, 2
%24 = load i32, i32* %1
%25 = icmp sgt i32 %23, %24
br i1 %25, label %42, label %18
26: ; preds = %8
%27 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.16, i64 0, i64 0))
%28 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.17, i64 0, i64 0))
%29 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.12, i64 0, i64 0))
%30 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.13, i64 0, i64 0))
%31 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.14, i64 0, i64 0))
%32 = load i32, i32* %1
%33 = icmp slt i32 %32, 6
br i1 %33, label %42, label %34
34: ; preds = %26, %34
%35 = phi i32 [ %39, %34 ], [ 6, %26 ]
%36 = or i32 %35, 1
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i32 %36, i32 %35)
%38 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.20, i64 0, i64 0))
%39 = add nuw nsw i32 %35, 2
%40 = load i32, i32* %1
%41 = icmp sgt i32 %39, %40
br i1 %41, label %42, label %34
42: ; preds = %34, %18, %26, %11, %6
ret i32 0
}