#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 */
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, ...);
int strlen(char *);
int main() {
  char *s = (char *)malloc(512000 * sizeof(char));
  scanf("%s", s);
  char *t = (char *)malloc(512000 * sizeof(char));
  scanf("%s", t);
  int k;
  scanf("%d", &k);
  int i = 0;
  while (s[i] == t[i]) {
    i++;
  }
  int sl = strlen(s), tl = strlen(t);
  int diff = k - sl - tl + 2 * i;
  if (diff < 0) {
    printf("No");
  } else if (diff <= 2 * i) {
    if (diff % 2 != 0) {
      printf("No");
    } else {
      printf("Yes");
    }
  } else {
    printf("Yes");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x7d000,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
mov    $0x7d000,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
lea    0xe6d(%rip),%rdi
lea    -0x1c(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
movl   $0x0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x18(%rbp),%rcx
movslq -0x20(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jne    11d6 <main+0x96>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11a8 <main+0x68>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x28(%rbp)
mov    -0x1c(%rbp),%eax
sub    -0x24(%rbp),%eax
sub    -0x28(%rbp),%eax
mov    -0x20(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
jge    121d <main+0xdd>
lea    0xdf3(%rip),%rdi
call   1040 <printf@plt>
jmp    1275 <main+0x135>
mov    -0x2c(%rbp),%eax
mov    -0x20(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jg     1264 <main+0x124>
mov    -0x2c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1253 <main+0x113>
lea    0xdbd(%rip),%rdi
call   1040 <printf@plt>
jmp    125f <main+0x11f>
lea    0xdaf(%rip),%rdi
call   1040 <printf@plt>
jmp    1270 <main+0x130>
lea    0xd9e(%rip),%rdi
call   1040 <printf@plt>
jmp    1275 <main+0x135>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    $0x7d000,%edi
call   1050 <malloc@plt>
mov    %rax,%r14
lea    0xea0(%rip),%r15
xor    %ebp,%ebp
mov    %r15,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    $0x7d000,%edi
call   1050 <malloc@plt>
mov    %rax,%r12
mov    %r15,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xe73(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    $0xfffffffe,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl (%r14,%rbp,1),%eax
lea    0x1(%rbp),%rcx
add    $0x2,%ebx
cmp    (%r12,%rbp,1),%al
mov    %rcx,%rbp
je     11b0 <main+0x70>
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %eax,%ebp
mov    %r12,%rdi
call   1030 <strlen@plt>
mov    0xc(%rsp),%edx
mov    %edx,%ecx
sub    %eax,%ecx
sub    %ebp,%ecx
add    %ebx,%ecx
js     11f6 <main+0xb6>
add    %ebp,%eax
sub    %eax,%edx
test   %edx,%edx
jle    11ff <main+0xbf>
lea    0xe15(%rip),%rdi
jmp    1214 <main+0xd4>
lea    0xe09(%rip),%rdi
jmp    1214 <main+0xd4>
test   $0x1,%cl
lea    0xe00(%rip),%rax
lea    0xdf6(%rip),%rdi
cmove  %rax,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

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