#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 atoi(char *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdin;
int strlen(char *);
char *strtok(char *, char *);
int main() {
  char input[30];
  int oddProduct = 1, evenProduct = 1, isOdd = 1;
  fgets(input, 30, stdin);
  int lengt = strlen(input);
  if (input[lengt - 1] == '\n') {
    input[lengt - 1] = '\0';
  }
  char *token = strtok(input, " ");
  int i;
  while (token != NULL) {
    int number = atoi(token);
    if ((isOdd = i % 2) != 0) {
      oddProduct *= number;
    } else {
      evenProduct *= number;
    }
    i++;
    token = strtok(NULL, " ");
  }
  if (oddProduct == evenProduct) {
    printf("yes\n");
    printf("%d", oddProduct);
  } else {
    printf("no\n");
    printf("odd_product = %d\n", oddProduct);
    printf("even_product = %d", evenProduct);
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x34(%rbp)
movl   $0x1,-0x38(%rbp)
movl   $0x1,-0x3c(%rbp)
lea    -0x30(%rbp),%rdi
mov    0x2e69(%rip),%rax
mov    (%rax),%edx
mov    $0x1e,%esi
call   1050 <fgets@plt>
lea    -0x30(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
sub    $0x1,%eax
cltq
movsbl -0x30(%rbp,%rax,1),%eax
cmp    $0xa,%eax
jne    11ba <main+0x6a>
mov    -0x40(%rbp),%eax
sub    $0x1,%eax
cltq
movb   $0x0,-0x30(%rbp,%rax,1)
lea    -0x30(%rbp),%rdi
lea    0xe3b(%rip),%rsi
call   1060 <strtok@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
je     1237 <main+0xe7>
mov    -0x48(%rbp),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x50(%rbp)
mov    -0x4c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0x3c(%rbp)
cmp    $0x0,%edx
je     120b <main+0xbb>
mov    -0x50(%rbp),%eax
imul   -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    1215 <main+0xc5>
mov    -0x50(%rbp),%eax
imul   -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xdd7(%rip),%rsi
call   1060 <strtok@plt>
mov    %rax,-0x48(%rbp)
jmp    11ce <main+0x7e>
mov    -0x34(%rbp),%eax
cmp    -0x38(%rbp),%eax
jne    1267 <main+0x117>
lea    0xdb8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x34(%rbp),%esi
lea    0xdd1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1297 <main+0x147>
lea    0xd99(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x34(%rbp),%esi
lea    0xd8c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x38(%rbp),%esi
lea    0xd8d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x20,%rsp
mov    0x2e75(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1e,%esi
call   1060 <fgets@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
cltq
cmpb   $0xa,-0x1(%rax,%rbx,1)
jne    119b <main+0x3b>
movb   $0x0,-0x1(%rsp,%rax,1)
lea    0xe5e(%rip),%rsi
mov    %rsp,%rdi
call   1070 <strtok@plt>
test   %rax,%rax
je     122a <main+0xca>
mov    $0x1,%r15d
lea    0xe44(%rip),%r14
mov    $0x1,%ebp
mov    $0x1,%r12d
nopw   0x0(%rax,%rax,1)
mov    %rax,%rdi
call   1080 <atoi@plt>
test   $0x1,%bl
mov    $0x1,%ecx
cmove  %eax,%ecx
cmove  %r15d,%eax
imul   %ecx,%r12d
imul   %eax,%ebp
add    $0x1,%ebx
xor    %edi,%edi
mov    %r14,%rsi
call   1070 <strtok@plt>
test   %rax,%rax
jne    11d0 <main+0x70>
cmp    %r12d,%ebp
je     1230 <main+0xd0>
lea    0xe1a(%rip),%rdi
call   1030 <puts@plt>
lea    0xdea(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xdec(%rip),%rdi
jmp    1243 <main+0xe3>
mov    $0x1,%r12d
lea    0xdf2(%rip),%rdi
call   1030 <puts@plt>
lea    0xde0(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [2 x i8] c" \00"
@.str.1 = [5 x i8] c"yes\0A\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [4 x i8] c"no\0A\00"
@.str.4 = [18 x i8] c"odd_product = %d\0A\00"
@.str.5 = [18 x i8] c"even_product = %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [30 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %3
store i32 1, i32* %4
store i32 1, i32* %5
%10 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%11 = load i32, i32* @stdin
%12 = call i32 @fgets(i8* %10, i32 30, i32 %11)
%13 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%14 = call i32 @strlen(i8* %13)
store i32 %14, i32* %6
%15 = load i32, i32* %6
%16 = sub nsw i32 %15, 1
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 %17
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 10
br i1 %21, label %22, label %27
22: ; preds = %0
%23 = load i32, i32* %6
%24 = sub nsw i32 %23, 1
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 %25
store i8 0, i8* %26
br label %27
27: ; preds = %22, %0
%28 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%29 = call i8* @strtok(i8* %28, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %29, i8** %7
br label %30
30: ; preds = %47, %27
%31 = load i8*, i8** %7
%32 = icmp ne i8* %31, null
br i1 %32, label %33, label %51
33: ; preds = %30
%34 = load i8*, i8** %7
%35 = call i32 @atoi(i8* %34)
store i32 %35, i32* %9
%36 = load i32, i32* %8
%37 = srem i32 %36, 2
store i32 %37, i32* %5
%38 = icmp ne i32 %37, 0
br i1 %38, label %39, label %43
39: ; preds = %33
%40 = load i32, i32* %9
%41 = load i32, i32* %3
%42 = mul nsw i32 %41, %40
store i32 %42, i32* %3
br label %47
43: ; preds = %33
%44 = load i32, i32* %9
%45 = load i32, i32* %4
%46 = mul nsw i32 %45, %44
store i32 %46, i32* %4
br label %47
47: ; preds = %43, %39
%48 = load i32, i32* %8
%49 = add nsw i32 %48, 1
store i32 %49, i32* %8
%50 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %50, i8** %7
br label %30
51: ; preds = %30
%52 = load i32, i32* %3
%53 = load i32, i32* %4
%54 = icmp eq i32 %52, %53
br i1 %54, label %55, label %59
55: ; preds = %51
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%57 = load i32, i32* %3
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %57)
br label %65
59: ; preds = %51
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%61 = load i32, i32* %3
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i32 %61)
%63 = load i32, i32* %4
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 %63)
br label %65
65: ; preds = %59, %55
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [2 x i8] c" \00"
@.str.2 = [3 x i8] c"%d\00"
@.str.4 = [18 x i8] c"odd_product = %d\0A\00"
@.str.5 = [18 x i8] c"even_product = %d\00"
@str = [3 x i8] c"no\00"
@str.6 = [4 x i8] c"yes\00"
define i32 @main() {
%1 = alloca [30 x i8]
%2 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @fgets(i8* %2, i32 30, i32 %3)
%5 = call i32 @strlen(i8* %2)
%6 = add nsw i32 %5, -1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 10
br i1 %10, label %11, label %12
11: ; preds = %0
store i8 0, i8* %8
br label %12
12: ; preds = %11, %0
%13 = call i8* @strtok(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%14 = icmp eq i8* %13, null
br i1 %14, label %32, label %15
15: ; preds = %12, %15
%16 = phi i32 [ %26, %15 ], [ 1, %12 ]
%17 = phi i32 [ %27, %15 ], [ undef, %12 ]
%18 = phi i8* [ %28, %15 ], [ %13, %12 ]
%19 = phi i32 [ %24, %15 ], [ 1, %12 ]
%20 = call i32 @atoi(i8* %18)
%21 = and i32 %17, 1
%22 = icmp eq i32 %21, 0
%23 = select i1 %22, i32 %20, i32 1
%24 = mul nsw i32 %23, %19
%25 = select i1 %22, i32 1, i32 %20
%26 = mul nsw i32 %25, %16
%27 = add nsw i32 %17, 1
%28 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%29 = icmp eq i8* %28, null
br i1 %29, label %30, label %15
30: ; preds = %15
%31 = icmp eq i32 %26, %24
br i1 %31, label %32, label %36
32: ; preds = %12, %30
%33 = phi i32 [ %24, %30 ], [ 1, %12 ]
%34 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.6, i64 0, i64 0))
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %33)
br label %40
36: ; preds = %30
%37 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i32 %26)
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 %24)
br label %40
40: ; preds = %36, %32
ret i32 0
}