function main(arg) {
    var half_mojisuu = parseInt(arg.split("\n")[0])/2;
    var kurikaesi_ver = arg.split("\n")[1].substr(0,half_mojisuu)+arg.split("\n")[1].substr(0,half_mojisuu);
    if(kurikaesi_ver==arg.split("\n")[1]){
        console.log("Yes");
    }else{
        console.log("No");
    }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));