#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*/ get_metrics(char *, int *, int *, int *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char buf[128], c;
  int i;
  int t0, t1, t2;
  int s0, s1, s2;
  scanf("%s", buf);
  get_metrics(buf, &s0, &s1, &s2);
  scanf("%s", buf);
  get_metrics(buf, &t0, &t1, &t2);
  if (s0 == t0 && s1 == t1 && s2 == t2)
    puts("YES");
  else
    puts("NO");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x90(%rbp),%rsi
lea    0xeb0(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x90(%rbp),%rdi
lea    -0xa8(%rbp),%rsi
lea    -0xac(%rbp),%rdx
lea    -0xb0(%rbp),%rcx
call   1050 <get_metrics@plt>
lea    -0x90(%rbp),%rsi
lea    0xe7c(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x90(%rbp),%rdi
lea    -0x9c(%rbp),%rsi
lea    -0xa0(%rbp),%rdx
lea    -0xa4(%rbp),%rcx
call   1050 <get_metrics@plt>
mov    -0xa8(%rbp),%eax
cmp    -0x9c(%rbp),%eax
jne    11f1 <main+0xc1>
mov    -0xac(%rbp),%eax
cmp    -0xa0(%rbp),%eax
jne    11f1 <main+0xc1>
mov    -0xb0(%rbp),%eax
cmp    -0xa4(%rbp),%eax
jne    11f1 <main+0xc1>
lea    0xe1c(%rip),%rdi
call   1030 <puts@plt>
jmp    11fd <main+0xcd>
lea    0xe0f(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xa8,%rsp
lea    0xebf(%rip),%r14
lea    0x20(%rsp),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rcx
mov    %rbx,%rdi
call   1050 <get_metrics@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
lea    0x1c(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0x14(%rsp),%rcx
mov    %rbx,%rdi
call   1050 <get_metrics@plt>
mov    0x10(%rsp),%eax
cmp    0x1c(%rsp),%eax
jne    11b1 <main+0x81>
mov    0xc(%rsp),%eax
cmp    0x18(%rsp),%eax
jne    11b1 <main+0x81>
mov    0x8(%rsp),%eax
cmp    0x14(%rsp),%eax
jne    11b1 <main+0x81>
lea    0xe54(%rip),%rdi
jmp    11b8 <main+0x88>
lea    0xe4f(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0xa8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"YES\00"
@.str.2 = [3 x i8] c"NO\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [128 x i8]
%3 = alloca i8
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %1
%11 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%14 = call i32 @get_metrics(i8* %13, i32* %8, i32* %9, i32* %10)
%15 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %15)
%17 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%18 = call i32 @get_metrics(i8* %17, i32* %5, i32* %6, i32* %7)
%19 = load i32, i32* %8
%20 = load i32, i32* %5
%21 = icmp eq i32 %19, %20
br i1 %21, label %22, label %32
22: ; preds = %0
%23 = load i32, i32* %9
%24 = load i32, i32* %6
%25 = icmp eq i32 %23, %24
br i1 %25, label %26, label %32
26: ; preds = %22
%27 = load i32, i32* %10
%28 = load i32, i32* %7
%29 = icmp eq i32 %27, %28
br i1 %29, label %30, label %32
30: ; preds = %26
%31 = call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %34
32: ; preds = %26, %22, %0
%33 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %34
34: ; preds = %32, %30
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"YES\00"
@.str.2 = [3 x i8] c"NO\00"
define i32 @main() {
%1 = alloca [128 x i8]
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%9 = bitcast i32* %2 to i8*
%10 = bitcast i32* %3 to i8*
%11 = bitcast i32* %4 to i8*
%12 = bitcast i32* %5 to i8*
%13 = bitcast i32* %6 to i8*
%14 = bitcast i32* %7 to i8*
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %8)
%16 = call i32 @get_metrics(i8* %8, i32* %5, i32* %6, i32* %7)
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %8)
%18 = call i32 @get_metrics(i8* %8, i32* %2, i32* %3, i32* %4)
%19 = load i32, i32* %5
%20 = load i32, i32* %2
%21 = icmp eq i32 %19, %20
br i1 %21, label %22, label %30
22: ; preds = %0
%23 = load i32, i32* %6
%24 = load i32, i32* %3
%25 = icmp eq i32 %23, %24
br i1 %25, label %26, label %30
26: ; preds = %22
%27 = load i32, i32* %7
%28 = load i32, i32* %4
%29 = icmp eq i32 %27, %28
br i1 %29, label %31, label %30
30: ; preds = %26, %22, %0
br label %31
31: ; preds = %26, %30
%32 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), %30 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %26 ]
%33 = call i32 @puts(i8* dereferenceable(1) %32)
ret i32 0
}