#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 *, char *);
int /*<<< orphan*/ scanf(char *, char *, char *, char *);
char *strchr(char *, char);
scalar_t__ strlen(char *);
scalar_t__ strspn(char *, char *);
int main() {
  char str1[102], str2[102], strs[102];
  int count;
  int is = 1;
  strchr("dfgg", 's');
  scanf("%s%s%s", str1, str2, strs);
  if (strlen(str1) + strlen(str2) != strlen(strs))
    is = 0;
  for (count = 0; str1[count] != '\0' && is != 0; count++) {
    char *z = strchr(strs, str1[count]);
    if (z == NULL) {
      is = 0;
      break;
    } else
      *z = '-';
  }
  for (count = 0; str2[count] != '\0' && is != 0; count++) {
    char *z = strchr(strs, str2[count]);
    if (z == NULL) {
      is = 0;
      break;
    } else
      *z = '-';
  }
  if (strspn(strs, "-") != strlen(strs)) {
    is = 0;
  }
  printf("%s", ((is == 0) ? "NO" : "YES"));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x190,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x158(%rbp)
lea    0xe8d(%rip),%rdi
mov    $0x73,%esi
call   1040 <strchr@plt>
lea    -0x70(%rbp),%rsi
lea    -0xe0(%rbp),%rdx
lea    -0x150(%rbp),%rcx
lea    0xe6f(%rip),%rdi
call   1070 <scanf@plt>
lea    -0x70(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x178(%rbp)
lea    -0xe0(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x178(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x170(%rbp)
lea    -0x150(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x170(%rbp),%rax
cmp    %rcx,%rax
je     11f4 <main+0xa4>
movl   $0x0,-0x158(%rbp)
movl   $0x0,-0x154(%rbp)
movslq -0x154(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x179(%rbp)
je     122b <main+0xdb>
cmpl   $0x0,-0x158(%rbp)
setne  %al
mov    %al,-0x179(%rbp)
mov    -0x179(%rbp),%al
test   $0x1,%al
jne    123e <main+0xee>
jmp    129d <main+0x14d>
lea    -0x150(%rbp),%rdi
movslq -0x154(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%esi
call   1040 <strchr@plt>
mov    %rax,-0x160(%rbp)
cmpq   $0x0,-0x160(%rbp)
jne    127a <main+0x12a>
movl   $0x0,-0x158(%rbp)
jmp    129d <main+0x14d>
mov    -0x160(%rbp),%rax
movb   $0x2d,(%rax)
jmp    1289 <main+0x139>
mov    -0x154(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x154(%rbp)
jmp    11fe <main+0xae>
movl   $0x0,-0x154(%rbp)
movslq -0x154(%rbp),%rax
movsbl -0xe0(%rbp,%rax,1),%ecx
ff
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x17a(%rbp)
je     12d7 <main+0x187>
cmpl   $0x0,-0x158(%rbp)
setne  %al
mov    %al,-0x17a(%rbp)
mov    -0x17a(%rbp),%al
test   $0x1,%al
jne    12ea <main+0x19a>
jmp    134c <main+0x1fc>
lea    -0x150(%rbp),%rdi
movslq -0x154(%rbp),%rax
movsbl -0xe0(%rbp,%rax,1),%esi
ff
call   1040 <strchr@plt>
mov    %rax,-0x168(%rbp)
cmpq   $0x0,-0x168(%rbp)
jne    1329 <main+0x1d9>
movl   $0x0,-0x158(%rbp)
jmp    134c <main+0x1fc>
mov    -0x168(%rbp),%rax
movb   $0x2d,(%rax)
jmp    1338 <main+0x1e8>
mov    -0x154(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x154(%rbp)
jmp    12a7 <main+0x157>
lea    -0x150(%rbp),%rdi
lea    0xcb2(%rip),%rsi
call   1060 <strspn@plt>
mov    %rax,-0x188(%rbp)
lea    -0x150(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x188(%rbp),%rax
cmp    %rcx,%rax
je     138f <main+0x23f>
movl   $0x0,-0x158(%rbp)
mov    -0x158(%rbp),%ecx
lea    0xc75(%rip),%rsi
lea    0xc6b(%rip),%rax
cmp    $0x0,%ecx
cmove  %rax,%rsi
lea    0xc58(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x190,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x150,%rsp
lea    0xe9a(%rip),%rdi
lea    0xe0(%rsp),%rbx
lea    0x70(%rsp),%r14
mov    %rsp,%r15
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %r15,%rcx
call   1070 <scanf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rax,%r12
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %rax,%rbx
add    %r12,%rbx
mov    %r15,%rdi
call   1030 <strlen@plt>
xor    %ebp,%ebp
cmp    %rax,%rbx
sete   %bpl
jne    11f4 <main+0xa4>
mov    0xe0(%rsp),%al
test   %al,%al
je     11f4 <main+0xa4>
lea    0xe1(%rsp),%rbp
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
movsbl %al,%esi
mov    %rbx,%rdi
call   1040 <strchr@plt>
test   %rax,%rax
je     1236 <main+0xe6>
movb   $0x2d,(%rax)
movzbl 0x0(%rbp),%eax
add    $0x1,%rbp
test   %al,%al
jne    11d0 <main+0x80>
mov    $0x1,%ebp
test   %ebp,%ebp
je     1238 <main+0xe8>
mov    0x70(%rsp),%al
test   %al,%al
je     1238 <main+0xe8>
lea    0x71(%rsp),%rbp
mov    %rsp,%rbx
nopl   0x0(%rax,%rax,1)
movsbl %al,%esi
mov    %rbx,%rdi
call   1040 <strchr@plt>
test   %rax,%rax
je     1236 <main+0xe6>
movb   $0x2d,(%rax)
movzbl 0x0(%rbp),%eax
add    $0x1,%rbp
test   %al,%al
jne    1210 <main+0xc0>
mov    $0x1,%ebp
jmp    1238 <main+0xe8>
xor    %ebp,%ebp
lea    0xdc8(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1060 <strspn@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
test   %ebp,%ebp
lea    0xdab(%rip),%rcx
lea    0xda7(%rip),%rsi
cmove  %rcx,%rsi
cmp    %rax,%rbx
cmovne %rcx,%rsi
lea    0xd8d(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x150,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"dfgg\00"
@.str.1 = [7 x i8] c"%s%s%s\00"
@.str.2 = [2 x i8] c"-\00"
@.str.3 = [3 x i8] c"%s\00"
@.str.4 = [3 x i8] c"NO\00"
@.str.5 = [4 x i8] c"YES\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [102 x i8]
%3 = alloca [102 x i8]
%4 = alloca [102 x i8]
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i32 0, i32* %1
store i32 1, i32* %6
%9 = call i8* @strchr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 signext 115)
%10 = getelementptr inbounds [102 x i8], [102 x i8]* %2, i64 0, i64 0
%11 = getelementptr inbounds [102 x i8], [102 x i8]* %3, i64 0, i64 0
%12 = getelementptr inbounds [102 x i8], [102 x i8]* %4, i64 0, i64 0
%13 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %10, i8* %11, i8* %12)
%14 = getelementptr inbounds [102 x i8], [102 x i8]* %2, i64 0, i64 0
%15 = call i64 @strlen(i8* %14)
%16 = getelementptr inbounds [102 x i8], [102 x i8]* %3, i64 0, i64 0
%17 = call i64 @strlen(i8* %16)
%18 = add nsw i64 %15, %17
%19 = getelementptr inbounds [102 x i8], [102 x i8]* %4, i64 0, i64 0
%20 = call i64 @strlen(i8* %19)
%21 = icmp ne i64 %18, %20
br i1 %21, label %22, label %23
22: ; preds = %0
store i32 0, i32* %6
br label %23
23: ; preds = %22, %0
store i32 0, i32* %5
br label %24
24: ; preds = %49, %23
%25 = load i32, i32* %5
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [102 x i8], [102 x i8]* %2, i64 0, i64 %26
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %34
31: ; preds = %24
%32 = load i32, i32* %6
%33 = icmp ne i32 %32, 0
br label %34
34: ; preds = %31, %24
%35 = phi i1 [ false, %24 ], [ %33, %31 ]
br i1 %35, label %36, label %52
36: ; preds = %34
%37 = getelementptr inbounds [102 x i8], [102 x i8]* %4, i64 0, i64 0
%38 = load i32, i32* %5
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [102 x i8], [102 x i8]* %2, i64 0, i64 %39
%41 = load i8, i8* %40
%42 = call i8* @strchr(i8* %37, i8 signext %41)
store i8* %42, i8** %7
%43 = load i8*, i8** %7
%44 = icmp eq i8* %43, null
br i1 %44, label %45, label %46
45: ; preds = %36
store i32 0, i32* %6
br label %52
46: ; preds = %36
%47 = load i8*, i8** %7
store i8 45, i8* %47
br label %48
48: ; preds = %46
br label %49
49: ; preds = %48
%50 = load i32, i32* %5
%51 = add nsw i32 %50, 1
store i32 %51, i32* %5
br label %24
52: ; preds = %45, %34
store i32 0, i32* %5
br label %53
53: ; preds = %78, %52
%54 = load i32, i32* %5
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [102 x i8], [102 x i8]* %3, i64 0, i64 %55
%57 = load i8, i8* %56
%58 = sext i8 %57 to i32
%59 = icmp ne i32 %58, 0
br i1 %59, label %60, label %63
60: ; preds = %53
%61 = load i32, i32* %6
%62 = icmp ne i32 %61, 0
br label %63
63: ; preds = %60, %53
%64 = phi i1 [ false, %53 ], [ %62, %60 ]
br i1 %64, label %65, label %81
65: ; preds = %63
%66 = getelementptr inbounds [102 x i8], [102 x i8]* %4, i64 0, i64 0
%67 = load i32, i32* %5
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [102 x i8], [102 x i8]* %3, i64 0, i64 %68
%70 = load i8, i8* %69
%71 = call i8* @strchr(i8* %66, i8 signext %70)
store i8* %71, i8** %8
%72 = load i8*, i8** %8
%73 = icmp eq i8* %72, null
br i1 %73, label %74, label %75
74: ; preds = %65
store i32 0, i32* %6
br label %81
75: ; preds = %65
%76 = load i8*, i8** %8
store i8 45, i8* %76
br label %77
77: ; preds = %75
br label %78
78: ; preds = %77
%79 = load i32, i32* %5
%80 = add nsw i32 %79, 1
store i32 %80, i32* %5
br label %53
81: ; preds = %74, %63
%82 = getelementptr inbounds [102 x i8], [102 x i8]* %4, i64 0, i64 0
%83 = call i64 @strspn(i8* %82, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%84 = getelementptr inbounds [102 x i8], [102 x i8]* %4, i64 0, i64 0
%85 = call i64 @strlen(i8* %84)
%86 = icmp ne i64 %83, %85
br i1 %86, label %87, label %88
87: ; preds = %81
store i32 0, i32* %6
br label %88
88: ; preds = %87, %81
%89 = load i32, i32* %6
%90 = icmp eq i32 %89, 0
%91 = zext i1 %90 to i64
%92 = select i1 %90, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0)
%93 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %92)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [7 x i8] c"%s%s%s\00"
@.str.2 = [2 x i8] c"-\00"
@.str.3 = [3 x i8] c"%s\00"
@.str.4 = [3 x i8] c"NO\00"
@.str.5 = [4 x i8] c"YES\00"
define i32 @main() {
%1 = alloca [102 x i8]
%2 = alloca [102 x i8]
%3 = alloca [102 x i8]
%4 = getelementptr inbounds [102 x i8], [102 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [102 x i8], [102 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [102 x i8], [102 x i8]* %3, i64 0, i64 0
%7 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %4, i8* %5, i8* %6)
%8 = call i64 @strlen(i8* %4)
%9 = call i64 @strlen(i8* %5)
%10 = add nsw i64 %9, %8
%11 = call i64 @strlen(i8* %6)
%12 = icmp eq i64 %10, %11
%13 = zext i1 %12 to i32
%14 = load i8, i8* %4
%15 = icmp ne i8 %14, 0
%16 = and i1 %12, %15
br i1 %16, label %17, label %27
17: ; preds = %0, %22
%18 = phi i64 [ %23, %22 ], [ 0, %0 ]
%19 = phi i8 [ %25, %22 ], [ %14, %0 ]
%20 = call i8* @strchr(i8* %6, i8 signext %19)
%21 = icmp eq i8* %20, null
br i1 %21, label %43, label %22
22: ; preds = %17
store i8 45, i8* %20
%23 = add nuw i64 %18, 1
%24 = getelementptr inbounds [102 x i8], [102 x i8]* %1, i64 0, i64 %23
%25 = load i8, i8* %24
%26 = icmp eq i8 %25, 0
br i1 %26, label %27, label %17
27: ; preds = %22, %0
%28 = phi i32 [ %13, %0 ], [ 1, %22 ]
%29 = load i8, i8* %5
%30 = icmp ne i8 %29, 0
%31 = icmp ne i32 %28, 0
%32 = and i1 %31, %30
br i1 %32, label %33, label %43
33: ; preds = %27, %38
%34 = phi i64 [ %39, %38 ], [ 0, %27 ]
%35 = phi i8 [ %41, %38 ], [ %29, %27 ]
%36 = call i8* @strchr(i8* %6, i8 signext %35)
%37 = icmp eq i8* %36, null
br i1 %37, label %43, label %38
38: ; preds = %33
store i8 45, i8* %36
%39 = add nuw i64 %34, 1
%40 = getelementptr inbounds [102 x i8], [102 x i8]* %2, i64 0, i64 %39
%41 = load i8, i8* %40
%42 = icmp eq i8 %41, 0
br i1 %42, label %43, label %33
43: ; preds = %17, %38, %33, %27
%44 = phi i32 [ %28, %27 ], [ 0, %33 ], [ 1, %38 ], [ 0, %17 ]
%45 = call i64 @strspn(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%46 = call i64 @strlen(i8* %6)
%47 = icmp ne i64 %45, %46
%48 = icmp eq i32 %44, 0
%49 = select i1 %47, i1 true, i1 %48
%50 = select i1 %49, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0)
%51 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %50)
ret i32 0
}