#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 length(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char str[50];
  char str1[50];
  scanf("%s\n", str);
  scanf("%s", str1);
  int count = length(str);
  int count1 = length(str1);
  int i, j;
  int num = 1;
  for (i = 0; i < (count - count1); i++) {
    for (j = i; j < (i + count1); j++) {
      if (str[i] != str1[j]) {
        num = 0;
        break;
      }
    }
    if (num == 1)
      break;
  }
  printf("%d\n", count);
  printf("%d\n", count1);
  if (num == 1) {
    printf("Yes");
  } else if (num == 0) {
    printf("No");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x80(%rbp),%rsi
lea    0xea7(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x40(%rbp),%rdi
call   1030 <length@plt>
mov    %eax,-0x84(%rbp)
lea    -0x80(%rbp),%rdi
call   1030 <length@plt>
mov    %eax,-0x88(%rbp)
movl   $0x1,-0x94(%rbp)
movl   $0x0,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
mov    -0x84(%rbp),%ecx
sub    -0x88(%rbp),%ecx
cmp    %ecx,%eax
jge    1247 <main+0x117>
mov    -0x8c(%rbp),%eax
mov    %eax,-0x90(%rbp)
mov    -0x90(%rbp),%eax
mov    -0x8c(%rbp),%ecx
add    -0x88(%rbp),%ecx
cmp    %ecx,%eax
jge    121c <main+0xec>
movslq -0x8c(%rbp),%rax
movsbl -0x40(%rbp,%rax,1),%eax
movslq -0x90(%rbp),%rcx
movsbl -0x80(%rbp,%rcx,1),%ecx
cmp    %ecx,%eax
je     1203 <main+0xd3>
movl   $0x0,-0x94(%rbp)
jmp    121c <main+0xec>
jmp    1208 <main+0xd8>
mov    -0x90(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x90(%rbp)
jmp    11ba <main+0x8a>
cmpl   $0x1,-0x94(%rbp)
jne    122e <main+0xfe>
jmp    1247 <main+0x117>
jmp    1233 <main+0x103>
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    1194 <main+0x64>
mov    -0x84(%rbp),%esi
lea    0xdb3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x88(%rbp),%esi
lea    0xd9f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x1,-0x94(%rbp)
jne    128f <main+0x15f>
lea    0xd88(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12af <main+0x17f>
cmpl   $0x0,-0x94(%rbp)
jne    12aa <main+0x17a>
lea    0xd6c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12af <main+0x17f>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x78,%rsp
lea    0xebf(%rip),%rdi
lea    0x40(%rsp),%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
lea    0xeaf(%rip),%rdi
mov    %rsp,%rbp
mov    %rbp,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1030 <length@plt>
mov    %eax,%r15d
mov    %rbp,%rdi
call   1030 <length@plt>
mov    %eax,%ebp
mov    %r15d,%eax
sub    %ebp,%eax
lea    0xe8a(%rip),%r14
test   %eax,%eax
jle    11d3 <main+0xa3>
movslq %ebp,%r9
mov    %eax,%ecx
mov    $0x1,%dil
xor    %esi,%esi
lea    0xe79(%rip),%r8
jmp    11b1 <main+0x81>
nopl   0x0(%rax,%rax,1)
test   $0x1,%dil
jne    11d3 <main+0xa3>
add    $0x1,%rsi
xor    %edi,%edi
cmp    %rcx,%rsi
je     11d0 <main+0xa0>
test   %ebp,%ebp
jle    11a0 <main+0x70>
lea    (%rsi,%r9,1),%rbx
mov    0x40(%rsp,%rsi,1),%al
mov    %rsi,%rdx
cmp    (%rsp,%rdx,1),%al
jne    11a6 <main+0x76>
add    $0x1,%rdx
cmp    %rbx,%rdx
jl     11c0 <main+0x90>
jmp    11a0 <main+0x70>
mov    %r8,%r14
lea    0xe2d(%rip),%rbx
mov    %rbx,%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

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