!function(t){var r={};function n(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=r,n.d=function(t,r,e){n.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:e})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,r){if(1&r&&(t=n(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(n.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var o in t)n.d(e,o,function(r){return t[r]}.bind(null,o));return e},n.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(r,"a",r),r},n.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},n.p="",n(n.s=0)}([function(t,r,n){"use strict";function e(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],e=!0,o=!1,i=void 0;try{for(var u,l=t[Symbol.iterator]();!(e=(u=l.next()).done)&&(n.push(u.value),!r||n.length!==r);e=!0);}catch(t){o=!0,i=t}finally{try{e||null==l.return||l.return()}finally{if(o)throw i}}return n}(t,r)||function(t,r){if(!t)return;if("string"==typeof t)return o(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(t,r)}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,e=new Array(r);n<r;n++)e[n]=t[n];return e}function i(t){var r=t.split("\n");""==r[r.length-1]&&r.pop(),this.l=r,this.y=0}i.prototype.ints=function(){return this.l[this.y++].split(" ").map((function(t){return+t}))},i.prototype.intv=function(){var t=this.y;return this.y=this.l.length,this.l.slice(t).map((function(t){return+t}))},i.prototype.strv=function(){var t=this.y;return this.y=this.l.length,this.l.slice(t)},i.prototype.strn=function(t){var r=this.y;return this.y+=t,this.l.slice(r,r+t)};var u=new i(n(1).readFileSync("/dev/stdin","utf8"));!function(){var t,r,n=e(u.ints(),2);t=n[0],r=n[1];for(var o=u.strn(t),i=u.strn(r),l=0;l<t-r;++l)for(var f=0;f<t-r;++f){for(var a=!0,c=0;c<r&&a;c++)for(var s=0;s<r&&a;s++)a=a&&o[l+c][f+s]==i[c][s];if(a)return console.log("Yes"),0}console.log("No")}()},function(t,r){t.exports=require("fs")}]);