module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";var r=n(1);n(2)(r.readFileSync("/dev/stdin","utf8"))},function(e,t){e.exports=require("fs")},function(e,t,n){"use strict";var r=n(3),i=n(5);e.exports=function(e){var t=new r(e);i(t)}},function(e,t,n){"use strict";var r=n(4);e.exports=class{constructor(e){var t=e.trim().split(/\s+/g);this.inp=new r(t)}inr(){return this.inp.deq()}in(){return parseInt(this.inp.deq(),10)}fin(){this.inp.clear()}}},function(e,t,n){"use strict";e.exports=class{constructor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.size=e.length,this.items=e,this.ind=0}enq(e){this.size+=1,this.items.push(e)}deq(){var e=this.items[this.ind];return this.size-=1,this.ind+=1,e}clear(){this.items=[],this.size=0,this.ind=0}}},function(e,t,n){"use strict";e.exports=function(e){for(var t=e.inr(),n=e.inr(),r=t.length,i=new Map,o=new Map,s=0;s<r;s++)if(i[t[s]]){if(i[t[s]]!=n[s])return void console.log("No")}else i[t[s]]=n[s],o[n[s]]=t[s];for(var u in i)if(u==i[u]){if(o[u]!=u)return void console.log("No")}else if(i[u]==o[i[u]])return void console.log("No");console.log("Yes")}}]);