'use strict';

const fs = require('fs');

process.stdin.resume();
process.stdin.setEncoding('utf-8');

let inputString = '';
let currentLine = 0;

process.stdin.on('data', function(inputStdin) {
    inputString += inputStdin;
});

process.stdin.on('end', function() {
    inputString = inputString.split('\n');

    main();
});

process.on('SIGINT', function() {
    inputString = inputString.split('\n');

    main();
    process.exit(0);
});

function readLine() {
    return inputString[currentLine++];
}

/*
 * Complete the 'appendAndDelete' function below.
 *
 * The function is expected to return a STRING.
 * The function accepts following parameters:
 *  1. STRING s
 *  2. STRING t
 *  3. INTEGER k
 */

function appendAndDelete(s, t, k) {
    let max = 0, res;
    s = s.trim();
    t = t.trim();
    for (let i = 0; i < Math.min(s.length, t.length); i++) {
        if (s[i] !== t[i]) {
            break;
        } else {
            max = i+1;
        }
    }


    // console.log(`Max: ${max}`);

    let operations = (s.length - max) + (t.length - max);
    let operations2 = s.length + t.length;
    console.log('Operations', operations);

    return k >= operations2 || (k >= operations && (operations - k) % 2 == 0) ? 'Yes' : 'No';

}

function main() {
    const ws = fs.createWriteStream(process.env.OUTPUT_PATH);

    const s = readLine();

    const t = readLine();

    const k = parseInt(readLine().trim(), 10);

    const result = appendAndDelete(s, t, k);

    ws.write(result + '\n');

    ws.end();
}
