#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 scanf(char *, char *, char *);
int strlen(char *);
int main() {
  char word[1000000];
  char sub[1000000];
  while (scanf("%s %s", word, sub) == 2) {
    int length = 0;
    int j;
    int i = 0;
    for (j = 0; j < strlen(sub); j++) {
      if (word[i] == sub[j]) {
        length++;
        i++;
      }
    }
    printf("%s\n", length == strlen(word) ? "Yes" : "No");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1e84b0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xf4250(%rbp),%rsi
lea    -0x1e8490(%rbp),%rdx
lea    0xea9(%rip),%rdi
call   1050 <scanf@plt>
cmp    $0x2,%eax
jne    124d <main+0x11d>
movl   $0x0,-0x1e8494(%rbp)
movl   $0x0,-0x1e849c(%rbp)
movl   $0x0,-0x1e8498(%rbp)
mov    -0x1e8498(%rbp),%eax
mov    %eax,-0x1e84a0(%rbp)
lea    -0x1e8490(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x1e84a0(%rbp),%eax
cmp    %ecx,%eax
jge    1208 <main+0xd8>
movslq -0x1e849c(%rbp),%rax
movsbl -0xf4250(%rbp,%rax,1),%eax
ff
movslq -0x1e8498(%rbp),%rcx
movsbl -0x1e8490(%rbp,%rcx,1),%ecx
ff
cmp    %ecx,%eax
jne    11ef <main+0xbf>
mov    -0x1e8494(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1e8494(%rbp)
mov    -0x1e849c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1e849c(%rbp)
jmp    11f4 <main+0xc4>
mov    -0x1e8498(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1e8498(%rbp)
jmp    1183 <main+0x53>
mov    -0x1e8494(%rbp),%eax
mov    %eax,-0x1e84a4(%rbp)
lea    -0xf4250(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x1e84a4(%rbp),%ecx
mov    %eax,%edx
lea    0xddf(%rip),%rsi
lea    0xdd4(%rip),%rax
cmp    %edx,%ecx
cmove  %rax,%rsi
lea    0xdc3(%rip),%rdi
call   1040 <printf@plt>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0x1e84b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1e8488,%rsp
lea    0xeb8(%rip),%rdi
lea    0xf4240(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
cmp    $0x2,%eax
jne    1211 <main+0xe1>
mov    %rsp,%rbx
lea    0xf4240(%rsp),%r14
lea    0xe8d(%rip),%r12
jmp    11bf <main+0x8f>
cs nopw 0x0(%rax,%rax,1)
nop
xor    %r13d,%r13d
mov    %r14,%rdi
call   1030 <strlen@plt>
cmp    %eax,%r13d
lea    0xe79(%rip),%rsi
lea    0xe6e(%rip),%rax
cmove  %rax,%rsi
lea    0xe5f(%rip),%rdi
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <scanf@plt>
cmp    $0x2,%eax
jne    1211 <main+0xe1>
mov    %rbx,%rdi
call   1030 <strlen@plt>
test   %eax,%eax
jle    1180 <main+0x50>
xor    %ebp,%ebp
xor    %r15d,%r15d
xor    %r13d,%r13d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15d,%eax
movzbl 0xf4240(%rsp,%rax,1),%eax
xor    %ecx,%ecx
cmp    (%rsp,%rbp,1),%al
sete   %cl
add    %ecx,%r13d
add    %ecx,%r15d
add    $0x1,%rbp
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%rbp
jl     11e0 <main+0xb0>
jmp    1183 <main+0x53>
xor    %eax,%eax
add    $0x1e8488,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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