Problem:
Score : 200 points

Problem Statement

Given N integers A_1, ..., A_N, compute A_1 \times ... \times A_N.

However, if the result exceeds 10^{18}, print -1 instead.

Constraints

2 \leq N \leq 10^5

0 \leq A_i \leq 10^{18}

All values in input are integers.

Input

Input is given from Standard Input in the following format:

N
A_1 ... A_N

Output

Print the value A_1 \times ... \times A_N as an integer, or -1 if the value exceeds 10^{18}.

Sample Input 1

2
1000000000 1000000000

Sample Output 1

1000000000000000000

We have 1000000000 \times 1000000000 = 1000000000000000000.

Sample Input 2

3
101 9901 999999000001

Sample Output 2

-1

We have 101 \times 9901 \times 999999000001 = 1000000000000000001, which exceeds 10^{18}, so we should print -1 instead.

Sample Input 3

31
4 1 5 9 2 6 5 3 5 8 9 7 9 3 2 3 8 4 6 2 6 4 3 3 8 3 2 7 9 5 0

Sample Output 3

0

Solution in JavaScript (Node.js 12.16.1) (judge verdict: Time Limit Exceeded)

!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=74)}([function(t,r,n){var e=n(7),o=n(51).f,i=n(13),u=n(27),a=n(40),c=n(77),f=n(60);t.exports=function(t,r){var n,s,l,v,p,d=t.target,h=t.global,g=t.stat;if(n=h?e:g?e[d]||a(d,{}):(e[d]||{}).prototype)for(s in r){if(v=r[s],l=t.noTargetGet?(p=o(n,s))&&p.value:n[s],!f(h?s:d+(g?".":"#")+s,t.forced)&&void 0!==l){if(typeof v==typeof l)continue;c(v,l)}(t.sham||l&&l.sham)&&i(v,"sham",!0),u(n,s,v,t)}}},function(t,r,n){var e=n(9);t.exports=function(t){if(!e(t))throw TypeError(String(t)+" is not an object");return t}},function(t,r){t.exports=!1},function(t,r,n){var e=n(1),o=n(88),i=n(24),u=n(6),a=n(61),c=n(91),f=function(t,r){this.stopped=t,this.result=r};(t.exports=function(t,r,n,s,l){var v,p,d,h,g,y,x=u(r,n,s?2:1);if(l)v=t;else{if("function"!=typeof(p=a(t)))throw TypeError("Target is not iterable");if(o(p)){for(d=0,h=i(t.length);h>d;d++)if((g=s?x(e(y=t[d])[0],y[1]):x(t[d]))&&g instanceof f)return g;return new f(!1)}v=p.call(t)}for(;!(y=v.next()).done;)if((g=c(v,x,y.value,s))&&g instanceof f)return g;return new f(!1)}).stop=function(t){return new f(!0,t)}},function(t,r){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,r,n){var e=n(58),o=n(7),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,r){return arguments.length<2?i(e[t])||i(o[t]):e[t]&&e[t][r]||o[t]&&o[t][r]}},function(t,r,n){var e=n(4);t.exports=function(t,r,n){if(e(t),void 0===r)return t;switch(n){case 0:return function(){return t.call(r)};case 1:return function(n){return t.call(r,n)};case 2:return function(n,e){return t.call(r,n,e)};case 3:return function(n,e,o){return t.call(r,n,e,o)}}return function(){return t.apply(r,arguments)}}},function(t,r){var n="object",e=function(t){return t&&t.Math==Math&&t};t.exports=e(typeof globalThis==n&&globalThis)||e(typeof window==n&&window)||e(typeof self==n&&self)||e(typeof global==n&&global)||Function("return this")()},function(t,r,n){var e=n(7),o=n(23),i=n(42),u=n(89),a=e.Symbol,c=o("wks");t.exports=function(t){return c[t]||(c[t]=u&&a[t]||(u?a:i)("Symbol."+t))}},function(t,r){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,r){var n={}.hasOwnProperty;t.exports=function(t,r){return n.call(t,r)}},function(t,r,n){var e=n(12),o=n(54),i=n(1),u=n(53),a=Object.defineProperty;r.f=e?a:function(t,r,n){if(i(t),r=u(r,!0),i(n),o)try{return a(t,r,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[r]=n.value),t}},function(t,r,n){var e=n(17);t.exports=!e((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,r,n){var e=n(12),o=n(11),i=n(25);t.exports=e?function(t,r,n){return o.f(t,r,i(1,n))}:function(t,r,n){return t[r]=n,t}},function(t,r,n){var e=n(2),o=n(36);t.exports=e?o:function(t){return Map.prototype.entries.call(t)}},function(t,r,n){var e=n(1),o=n(4),i=n(8)("species");t.exports=function(t,r){var n,u=e(t).constructor;return void 0===u||null==(n=e(u)[i])?r:o(n)}},function(t,r,n){var e=n(64),o=n(68),i=n(23)("metadata"),u=i.store||(i.store=new o),a=function(t,r,n){var o=u.get(t);if(!o){if(!n)return;u.set(t,o=new e)}var i=o.get(r);if(!i){if(!n)return;o.set(r,i=new e)}return i};t.exports={store:u,getMap:a,has:function(t,r,n){var e=a(r,n,!1);return void 0!==e&&e.has(t)},get:function(t,r,n){var e=a(r,n,!1);return void 0===e?void 0:e.get(t)},set:function(t,r,n,e){a(n,e,!0).set(t,r)},keys:function(t,r){var n=a(t,r,!1),e=[];return n&&n.forEach((function(t,r){e.push(r)})),e},toKey:function(t){return void 0===t||"symbol"==typeof t?t:String(t)}}},function(t,r){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,r,n){var e,o,i,u=n(57),a=n(7),c=n(9),f=n(13),s=n(10),l=n(41),v=n(28),p=a.WeakMap;if(u){var d=new p,h=d.get,g=d.has,y=d.set;e=function(t,r){return y.call(d,t,r),r},o=function(t){return h.call(d,t)||{}},i=function(t){return g.call(d,t)}}else{var x=l("state");v[x]=!0,e=function(t,r){return f(t,x,r),r},o=function(t){return s(t,x)?t[x]:{}},i=function(t){return s(t,x)}}t.exports={set:e,get:o,has:i,enforce:function(t){return i(t)?o(t):e(t,{})},getterFor:function(t){return function(r){var n;if(!c(r)||(n=o(r)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},function(t,r,n){var e=n(2),o=n(36);t.exports=e?o:function(t){return Set.prototype.values.call(t)}},function(t,r){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,r,n){var e=n(10),o=n(30),i=n(41),u=n(83),a=i("IE_PROTO"),c=Object.prototype;t.exports=u?Object.getPrototypeOf:function(t){return t=o(t),e(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},function(t,r,n){var e=n(1),o=n(85),i=n(43),u=n(28),a=n(87),c=n(55),f=n(41)("IE_PROTO"),s=function(){},l=function(){var t,r=c("iframe"),n=i.length;for(r.style.display="none",a.appendChild(r),r.src=String("javascript:"),(t=r.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),l=t.F;n--;)delete l.prototype[i[n]];return l()};t.exports=Object.create||function(t,r){var n;return null!==t?(s.prototype=e(t),n=new s,s.prototype=null,n[f]=t):n=l(),void 0===r?n:o(n,r)},u[f]=!0},function(t,r,n){var e=n(7),o=n(40),i=n(2),u=e["__core-js_shared__"]||o("__core-js_shared__",{});(t.exports=function(t,r){return u[t]||(u[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.1.3",mode:i?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,r,n){var e=n(29),o=Math.min;t.exports=function(t){return t>0?o(e(t),9007199254740991):0}},function(t,r){t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},function(t,r){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,r,n){var e=n(7),o=n(23),i=n(13),u=n(10),a=n(40),c=n(56),f=n(18),s=f.get,l=f.enforce,v=String(c).split("toString");o("inspectSource",(function(t){return c.call(t)})),(t.exports=function(t,r,n,o){var c=!!o&&!!o.unsafe,f=!!o&&!!o.enumerable,s=!!o&&!!o.noTargetGet;"function"==typeof n&&("string"!=typeof r||u(n,"name")||i(n,"name",r),l(n).source=v.join("string"==typeof r?r:"")),t!==e?(c?!s&&t[r]&&(f=!0):delete t[r],f?t[r]=n:i(t,r,n)):f?t[r]=n:a(r,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&s(this).source||c.call(this)}))},function(t,r){t.exports={}},function(t,r){var n=Math.ceil,e=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?e:n)(t)}},function(t,r,n){var e=n(20);t.exports=function(t){return Object(e(t))}},function(t,r){t.exports={}},function(t,r,n){var e=n(28),o=n(9),i=n(10),u=n(11).f,a=n(42),c=n(95),f=a("meta"),s=0,l=Object.isExtensible||function(){return!0},v=function(t){u(t,f,{value:{objectID:"O"+ ++s,weakData:{}}})},p=t.exports={REQUIRED:!1,fastKey:function(t,r){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,f)){if(!l(t))return"F";if(!r)return"E";v(t)}return t[f].objectID},getWeakData:function(t,r){if(!i(t,f)){if(!l(t))return!0;if(!r)return!1;v(t)}return t[f].weakData},onFreeze:function(t){return c&&p.REQUIRED&&l(t)&&!i(t,f)&&v(t),t}};e[f]=!0},function(t,r){t.exports=function(t,r,n){if(!(t instanceof r))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},function(t,r,n){var e=n(27);t.exports=function(t,r,n){for(var o in r)e(t,o,r[o],n);return t}},function(t,r,n){"use strict";var e=n(1),o=n(4);t.exports=function(){for(var t=e(this),r=o(t.delete),n=!0,i=0,u=arguments.length;i<u;i++)n=n&&r.call(t,arguments[i]);return!!n}},function(t,r,n){var e=n(1),o=n(61);t.exports=function(t){var r=o(t);if("function"!=typeof r)throw TypeError(String(t)+" is not iterable");return e(r.call(t))}},function(t,r,n){"use strict";var e=n(4),o=n(6),i=n(3);t.exports=function(t){var r,n,u,a,c=arguments.length,f=c>1?arguments[1]:void 0;return e(this),(r=void 0!==f)&&e(f),null==t?new this:(n=[],r?(u=0,a=o(f,c>2?arguments[2]:void 0,2),i(t,(function(t){n.push(a(t,u++))}))):i(t,n.push,n),new this(n))}},function(t,r,n){"use strict";t.exports=function(){for(var t=arguments.length,r=new Array(t);t--;)r[t]=arguments[t];return new this(r)}},function(t,r,n){var e=n(52),o=n(20);t.exports=function(t){return e(o(t))}},function(t,r,n){var e=n(7),o=n(13);t.exports=function(t,r){try{o(e,t,r)}catch(n){e[t]=r}return r}},function(t,r,n){var e=n(23),o=n(42),i=e("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,r){var n=0,e=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+e).toString(36)}},function(t,r){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,r,n){var e=n(1),o=n(84);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),r=n instanceof Array}catch(t){}return function(n,i){return e(n),o(i),r?t.call(n,i):n.__proto__=i,n}}():void 0)},function(t,r,n){"use strict";var e=n(0),o=n(7),i=n(60),u=n(27),a=n(32),c=n(3),f=n(33),s=n(9),l=n(17),v=n(96),p=n(46),d=n(97);t.exports=function(t,r,n,h,g){var y=o[t],x=y&&y.prototype,b=y,m=h?"set":"add",w={},S=function(t){var r=x[t];u(x,t,"add"==t?function(t){return r.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(g&&!s(t))&&r.call(this,0===t?0:t)}:"get"==t?function(t){return g&&!s(t)?void 0:r.call(this,0===t?0:t)}:"has"==t?function(t){return!(g&&!s(t))&&r.call(this,0===t?0:t)}:function(t,n){return r.call(this,0===t?0:t,n),this})};if(i(t,"function"!=typeof y||!(g||x.forEach&&!l((function(){(new y).entries().next()})))))b=n.getConstructor(r,t,h,m),a.REQUIRED=!0;else if(i(t,!0)){var O=new b,M=O[m](g?{}:-0,1)!=O,j=l((function(){O.has(1)})),E=v((function(t){new y(t)})),A=!g&&l((function(){for(var t=new y,r=5;r--;)t[m](r,r);return!t.has(-0)}));E||((b=r((function(r,n){f(r,b,t);var e=d(new y,r,b);return null!=n&&c(n,e[m],e,h),e}))).prototype=x,x.constructor=b),(j||A)&&(S("delete"),S("has"),h&&S("get")),(A||M)&&S(m),g&&x.clear&&delete x.clear}return w[t]=b,e({global:!0,forced:b!=y},w),p(b,t),g||n.setStrong(b,t,h),b}},function(t,r,n){var e=n(11).f,o=n(10),i=n(8)("toStringTag");t.exports=function(t,r,n){t&&!o(t=n?t:t.prototype,i)&&e(t,i,{configurable:!0,value:r})}},function(t,r,n){"use strict";var e=n(66).IteratorPrototype,o=n(22),i=n(25),u=n(46),a=n(31),c=function(){return this};t.exports=function(t,r,n){var f=r+" Iterator";return t.prototype=o(e,{next:i(1,n)}),u(t,f,!1,!0),a[f]=c,t}},function(t,r,n){"use strict";var e=n(4),o=function(t){var r,n;this.promise=new t((function(t,e){if(void 0!==r||void 0!==n)throw TypeError("Bad Promise constructor");r=t,n=e})),this.resolve=e(r),this.reject=e(n)};t.exports.f=function(t){return new o(t)}},function(t,r){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},function(t,r,n){var e=n(58),o=n(10),i=n(180),u=n(11).f;t.exports=function(t){var r=e.Symbol||(e.Symbol={});o(r,t)||u(r,t,{value:i.f(t)})}},function(t,r,n){var e=n(12),o=n(76),i=n(25),u=n(39),a=n(53),c=n(10),f=n(54),s=Object.getOwnPropertyDescriptor;r.f=e?s:function(t,r){if(t=u(t),r=a(r,!0),f)try{return s(t,r)}catch(t){}if(c(t,r))return i(!o.f.call(t,r),t[r])}},function(t,r,n){var e=n(17),o=n(26),i="".split;t.exports=e((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},function(t,r,n){var e=n(9);t.exports=function(t,r){if(!e(t))return t;var n,o;if(r&&"function"==typeof(n=t.toString)&&!e(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!e(o=n.call(t)))return o;if(!r&&"function"==typeof(n=t.toString)&&!e(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,r,n){var e=n(12),o=n(17),i=n(55);t.exports=!e&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,r,n){var e=n(7),o=n(9),i=e.document,u=o(i)&&o(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},function(t,r,n){var e=n(23);t.exports=e("native-function-to-string",Function.toString)},function(t,r,n){var e=n(7),o=n(56),i=e.WeakMap;t.exports="function"==typeof i&&/native code/.test(o.call(i))},function(t,r,n){t.exports=n(7)},function(t,r,n){var e=n(10),o=n(39),i=n(80).indexOf,u=n(28);t.exports=function(t,r){var n,a=o(t),c=0,f=[];for(n in a)!e(u,n)&&e(a,n)&&f.push(n);for(;r.length>c;)e(a,n=r[c++])&&(~i(f,n)||f.push(n));return f}},function(t,r,n){var e=n(17),o=/#|\.prototype\./,i=function(t,r){var n=a[u(t)];return n==f||n!=c&&("function"==typeof r?e(r):!!r)},u=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},a=i.data={},c=i.NATIVE="N",f=i.POLYFILL="P";t.exports=i},function(t,r,n){var e=n(90),o=n(31),i=n(8)("iterator");t.exports=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[e(t)]}},function(t,r,n){var e=n(8),o=n(22),i=n(13),u=e("unscopables"),a=Array.prototype;null==a[u]&&i(a,u,o(null)),t.exports=function(t){a[u][t]=!0}},function(t,r,n){var e=n(64),o=n(68),i=n(22),u=n(9),a=function(){this.object=null,this.symbol=null,this.primitives=null,this.objectsByIndex=i(null)};a.prototype.get=function(t,r){return this[t]||(this[t]=r())},a.prototype.next=function(t,r,n){var i=n?this.objectsByIndex[t]||(this.objectsByIndex[t]=new o):this.primitives||(this.primitives=new e),u=i.get(r);return u||i.set(r,u=new a),u};var c=new a;t.exports=function(){var t,r,n=c,e=arguments.length;for(t=0;t<e;t++)u(r=arguments[t])&&(n=n.next(t,r,!0));if(this===Object&&n===c)throw TypeError("Composite keys must contain a non-primitive component");for(t=0;t<e;t++)u(r=arguments[t])||(n=n.next(t,r,!1));return n}},function(t,r,n){"use strict";var e=n(45),o=n(65);t.exports=e("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),o,!0)},function(t,r,n){"use strict";var e=n(11).f,o=n(22),i=n(34),u=n(6),a=n(33),c=n(3),f=n(98),s=n(67),l=n(12),v=n(32).fastKey,p=n(18),d=p.set,h=p.getterFor;t.exports={getConstructor:function(t,r,n,f){var s=t((function(t,e){a(t,s,r),d(t,{type:r,index:o(null),first:void 0,last:void 0,size:0}),l||(t.size=0),null!=e&&c(e,t[f],t,n)})),p=h(r),g=function(t,r,n){var e,o,i=p(t),u=y(t,r);return u?u.value=n:(i.last=u={index:o=v(r,!0),key:r,value:n,previous:e=i.last,next:void 0,removed:!1},i.first||(i.first=u),e&&(e.next=u),l?i.size++:t.size++,"F"!==o&&(i.index[o]=u)),t},y=function(t,r){var n,e=p(t),o=v(r);if("F"!==o)return e.index[o];for(n=e.first;n;n=n.next)if(n.key==r)return n};return i(s.prototype,{clear:function(){for(var t=p(this),r=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete r[n.index],n=n.next;t.first=t.last=void 0,l?t.size=0:this.size=0},delete:function(t){var r=p(this),n=y(this,t);if(n){var e=n.next,o=n.previous;delete r.index[n.index],n.removed=!0,o&&(o.next=e),e&&(e.previous=o),r.first==n&&(r.first=e),r.last==n&&(r.last=o),l?r.size--:this.size--}return!!n},forEach:function(t){for(var r,n=p(this),e=u(t,arguments.length>1?arguments[1]:void 0,3);r=r?r.next:n.first;)for(e(r.value,r.key,this);r&&r.removed;)r=r.previous},has:function(t){return!!y(this,t)}}),i(s.prototype,n?{get:function(t){var r=y(this,t);return r&&r.value},set:function(t,r){return g(this,0===t?0:t,r)}}:{add:function(t){return g(this,t=0===t?0:t,t)}}),l&&e(s.prototype,"size",{get:function(){return p(this).size}}),s},setStrong:function(t,r,n){var e=r+" Iterator",o=h(r),i=h(e);f(t,r,(function(t,r){d(this,{type:e,target:t,state:o(t),kind:r,last:void 0})}),(function(){for(var t=i(this),r=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?"keys"==r?{value:n.key,done:!1}:"values"==r?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),s(r)}}},function(t,r,n){"use strict";var e,o,i,u=n(21),a=n(13),c=n(10),f=n(8),s=n(2),l=f("iterator"),v=!1;[].keys&&("next"in(i=[].keys())?(o=u(u(i)))!==Object.prototype&&(e=o):v=!0),null==e&&(e={}),s||c(e,l)||a(e,l,(function(){return this})),t.exports={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:v}},function(t,r,n){"use strict";var e=n(5),o=n(11),i=n(8),u=n(12),a=i("species");t.exports=function(t){var r=e(t),n=o.f;u&&r&&!r[a]&&n(r,a,{configurable:!0,get:function(){return this}})}},function(t,r,n){"use strict";var e,o=n(7),i=n(34),u=n(32),a=n(45),c=n(99),f=n(9),s=n(18).enforce,l=n(57),v=!o.ActiveXObject&&"ActiveXObject"in o,p=Object.isExtensible,d=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},h=t.exports=a("WeakMap",d,c,!0,!0);if(l&&v){e=c.getConstructor(d,"WeakMap",!0),u.REQUIRED=!0;var g=h.prototype,y=g.delete,x=g.has,b=g.get,m=g.set;i(g,{delete:function(t){if(f(t)&&!p(t)){var r=s(this);return r.frozen||(r.frozen=new e),y.call(this,t)||r.frozen.delete(t)}return y.call(this,t)},has:function(t){if(f(t)&&!p(t)){var r=s(this);return r.frozen||(r.frozen=new e),x.call(this,t)||r.frozen.has(t)}return x.call(this,t)},get:function(t){if(f(t)&&!p(t)){var r=s(this);return r.frozen||(r.frozen=new e),x.call(this,t)?b.call(this,t):r.frozen.get(t)}return b.call(this,t)},set:function(t,r){if(f(t)&&!p(t)){var n=s(this);n.frozen||(n.frozen=new e),x.call(this,t)?m.call(this,t,r):n.frozen.set(t,r)}else m.call(this,t,r);return this}})}},function(t,r){t.exports=Math.scale||function(t,r,n,e,o){return 0===arguments.length||t!=t||r!=r||n!=n||e!=e||o!=o?NaN:t===1/0||t===-1/0?t:(t-r)*(o-e)/(n-r)+e}},function(t,r){t.exports="\t\n\v\f\r                　\u2028\u2029\ufeff"},function(t,r,n){"use strict";var e=n(1),o=n(4);t.exports=function(){for(var t=e(this),r=o(t.add),n=0,i=arguments.length;n<i;n++)r.call(t,arguments[n]);return t}},function(t,r,n){var e=n(29),o=n(20),i=function(t){return function(r,n){var i,u,a=String(o(r)),c=e(n),f=a.length;return c<0||c>=f?t?"":void 0:(i=a.charCodeAt(c))<55296||i>56319||c+1===f||(u=a.charCodeAt(c+1))<56320||u>57343?t?a.charAt(c):i:t?a.slice(c,c+2):u-56320+(i-55296<<10)+65536}};t.exports={codeAt:i(!1),charAt:i(!0)}},function(t,r){t.exports=require("fs")},function(t,r,n){"use strict";n.r(r);n(75),n(92),n(93),n(94),n(103),n(104),n(105),n(106),n(107),n(108),n(109),n(110),n(111),n(113),n(114),n(115),n(116),n(117),n(118),n(119),n(120),n(121),n(122),n(123),n(124),n(125),n(128),n(129),n(130),n(131),n(132),n(133),n(134),n(136),n(137),n(138),n(141),n(143),n(144),n(145),n(146),n(147),n(148),n(149),n(151),n(152),n(153),n(154),n(155),n(156),n(157),n(158),n(159),n(160),n(161),n(162),n(163),n(164),n(165),n(166),n(167),n(168),n(169),n(170),n(171),n(172),n(173),n(174),n(175),n(176),n(179),n(181),n(182),n(183),n(184),n(185),n(186),n(187),n(188),n(189);var e=n(73);(t=>{const r=t.trim().split("\n"),n=(r[0],r[1].trim().split(" "));let e=n[0],o=1;for(;o<n.length;)e=BigInt(e)*BigInt(n[o]),o=o+1|0;e>10**18?console.log(-1):console.log(e.toString())})(e.readFileSync("/dev/stdin","utf8"))},function(t,r,n){var e=n(0),o=n(21),i=n(44),u=n(22),a=n(25),c=n(3),f=n(13),s=function(t,r){var n=this;if(!(n instanceof s))return new s(t,r);i&&(n=i(new Error(r),o(n)));var e=[];return c(t,e.push,e),n.errors=e,void 0!==r&&f(n,"message",String(r)),n};s.prototype=u(Error.prototype,{constructor:a(5,s),name:a(5,"AggregateError")}),e({global:!0},{AggregateError:s})},function(t,r,n){"use strict";var e={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!e.call({1:2},1);r.f=i?function(t){var r=o(this,t);return!!r&&r.enumerable}:e},function(t,r,n){var e=n(10),o=n(78),i=n(51),u=n(11);t.exports=function(t,r){for(var n=o(r),a=u.f,c=i.f,f=0;f<n.length;f++){var s=n[f];e(t,s)||a(t,s,c(r,s))}}},function(t,r,n){var e=n(5),o=n(79),i=n(82),u=n(1);t.exports=e("Reflect","ownKeys")||function(t){var r=o.f(u(t)),n=i.f;return n?r.concat(n(t)):r}},function(t,r,n){var e=n(59),o=n(43).concat("length","prototype");r.f=Object.getOwnPropertyNames||function(t){return e(t,o)}},function(t,r,n){var e=n(39),o=n(24),i=n(81),u=function(t){return function(r,n,u){var a,c=e(r),f=o(c.length),s=i(u,f);if(t&&n!=n){for(;f>s;)if((a=c[s++])!=a)return!0}else for(;f>s;s++)if((t||s in c)&&c[s]===n)return t||s||0;return!t&&-1}};t.exports={includes:u(!0),indexOf:u(!1)}},function(t,r,n){var e=n(29),o=Math.max,i=Math.min;t.exports=function(t,r){var n=e(t);return n<0?o(n+r,0):i(n,r)}},function(t,r){r.f=Object.getOwnPropertySymbols},function(t,r,n){var e=n(17);t.exports=!e((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,r,n){var e=n(9);t.exports=function(t){if(!e(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},function(t,r,n){var e=n(12),o=n(11),i=n(1),u=n(86);t.exports=e?Object.defineProperties:function(t,r){i(t);for(var n,e=u(r),a=e.length,c=0;a>c;)o.f(t,n=e[c++],r[n]);return t}},function(t,r,n){var e=n(59),o=n(43);t.exports=Object.keys||function(t){return e(t,o)}},function(t,r,n){var e=n(5);t.exports=e("document","documentElement")},function(t,r,n){var e=n(8),o=n(31),i=e("iterator"),u=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||u[i]===t)}},function(t,r,n){var e=n(17);t.exports=!!Object.getOwnPropertySymbols&&!e((function(){return!String(Symbol())}))},function(t,r,n){var e=n(26),o=n(8)("toStringTag"),i="Arguments"==e(function(){return arguments}());t.exports=function(t){var r,n,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,r){try{return t[r]}catch(t){}}(r=Object(t),o))?n:i?e(r):"Object"==(u=e(r))&&"function"==typeof r.callee?"Arguments":u}},function(t,r,n){var e=n(1);t.exports=function(t,r,n,o){try{return o?r(e(n)[0],n[1]):r(n)}catch(r){var i=t.return;throw void 0!==i&&e(i.call(t)),r}}},function(t,r,n){"use strict";var e=n(12),o=n(62),i=n(30),u=n(24),a=n(11).f;e&&!("lastIndex"in[])&&(a(Array.prototype,"lastIndex",{configurable:!0,get:function(){var t=i(this),r=u(t.length);return 0==r?0:r-1}}),o("lastIndex"))},function(t,r,n){"use strict";var e=n(12),o=n(62),i=n(30),u=n(24),a=n(11).f;e&&!("lastItem"in[])&&(a(Array.prototype,"lastItem",{configurable:!0,get:function(){var t=i(this),r=u(t.length);return 0==r?void 0:t[r-1]},set:function(t){var r=i(this),n=u(r.length);return r[0==n?0:n-1]=t}}),o("lastItem"))},function(t,r,n){var e=n(0),o=n(63),i=n(5),u=n(22),a=function(){var t=i("Object","freeze");return t?t(u(null)):u(null)};e({global:!0},{compositeKey:function(){return o.apply(Object,arguments).get("object",a)}})},function(t,r,n){var e=n(17);t.exports=!e((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(t,r,n){var e=n(8)("iterator"),o=!1;try{var i=0,u={next:function(){return{done:!!i++}},return:function(){o=!0}};u[e]=function(){return this},Array.from(u,(function(){throw 2}))}catch(t){}t.exports=function(t,r){if(!r&&!o)return!1;var n=!1;try{var i={};i[e]=function(){return{next:function(){return{done:n=!0}}}},t(i)}catch(t){}return n}},function(t,r,n){var e=n(9),o=n(44);t.exports=function(t,r,n){var i,u;return o&&"function"==typeof(i=r.constructor)&&i!==n&&e(u=i.prototype)&&u!==n.prototype&&o(t,u),t}},function(t,r,n){"use strict";var e=n(0),o=n(47),i=n(21),u=n(44),a=n(46),c=n(13),f=n(27),s=n(8),l=n(2),v=n(31),p=n(66),d=p.IteratorPrototype,h=p.BUGGY_SAFARI_ITERATORS,g=s("iterator"),y=function(){return this};t.exports=function(t,r,n,s,p,x,b){o(n,r,s);var m,w,S,O=function(t){if(t===p&&I)return I;if(!h&&t in E)return E[t];switch(t){case"keys":case"values":case"entries":return function(){return new n(this,t)}}return function(){return new n(this)}},M=r+" Iterator",j=!1,E=t.prototype,A=E[g]||E["@@iterator"]||p&&E[p],I=!h&&A||O(p),P="Array"==r&&E.entries||A;if(P&&(m=i(P.call(new t)),d!==Object.prototype&&m.next&&(l||i(m)===d||(u?u(m,d):"function"!=typeof m[g]&&c(m,g,y)),a(m,M,!0,!0),l&&(v[M]=y))),"values"==p&&A&&"values"!==A.name&&(j=!0,I=function(){return A.call(this)}),l&&!b||E[g]===I||c(E,g,I),v[r]=I,p)if(w={values:O("values"),keys:x?I:O("keys"),entries:O("entries")},b)for(S in w)(h||j||!(S in E))&&f(E,S,w[S]);else e({target:r,proto:!0,forced:h||j},w);return w}},function(t,r,n){"use strict";var e=n(34),o=n(32).getWeakData,i=n(1),u=n(9),a=n(33),c=n(3),f=n(100),s=n(10),l=n(18),v=l.set,p=l.getterFor,d=f.find,h=f.findIndex,g=0,y=function(t){return t.frozen||(t.frozen=new x)},x=function(){this.entries=[]},b=function(t,r){return d(t.entries,(function(t){return t[0]===r}))};x.prototype={get:function(t){var r=b(this,t);if(r)return r[1]},has:function(t){return!!b(this,t)},set:function(t,r){var n=b(this,t);n?n[1]=r:this.entries.push([t,r])},delete:function(t){var r=h(this.entries,(function(r){return r[0]===t}));return~r&&this.entries.splice(r,1),!!~r}},t.exports={getConstructor:function(t,r,n,f){var l=t((function(t,e){a(t,l,r),v(t,{type:r,id:g++,frozen:void 0}),null!=e&&c(e,t[f],t,n)})),d=p(r),h=function(t,r,n){var e=d(t),u=o(i(r),!0);return!0===u?y(e).set(r,n):u[e.id]=n,t};return e(l.prototype,{delete:function(t){var r=d(this);if(!u(t))return!1;var n=o(t);return!0===n?y(r).delete(t):n&&s(n,r.id)&&delete n[r.id]},has:function(t){var r=d(this);if(!u(t))return!1;var n=o(t);return!0===n?y(r).has(t):n&&s(n,r.id)}}),e(l.prototype,n?{get:function(t){var r=d(this);if(u(t)){var n=o(t);return!0===n?y(r).get(t):n?n[r.id]:void 0}},set:function(t,r){return h(this,t,r)}}:{add:function(t){return h(this,t,!0)}}),l}}},function(t,r,n){var e=n(6),o=n(52),i=n(30),u=n(24),a=n(101),c=[].push,f=function(t){var r=1==t,n=2==t,f=3==t,s=4==t,l=6==t,v=5==t||l;return function(p,d,h,g){for(var y,x,b=i(p),m=o(b),w=e(d,h,3),S=u(m.length),O=0,M=g||a,j=r?M(p,S):n?M(p,0):void 0;S>O;O++)if((v||O in m)&&(x=w(y=m[O],O,b),t))if(r)j[O]=x;else if(x)switch(t){case 3:return!0;case 5:return y;case 6:return O;case 2:c.call(j,y)}else if(s)return!1;return l?-1:f||s?s:j}};t.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6)}},function(t,r,n){var e=n(9),o=n(102),i=n(8)("species");t.exports=function(t,r){var n;return o(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!o(n.prototype)?e(n)&&null===(n=n[i])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===r?0:r)}},function(t,r,n){var e=n(26);t.exports=Array.isArray||function(t){return"Array"==e(t)}},function(t,r,n){var e=n(0),o=n(63),i=n(5);e({global:!0},{compositeSymbol:function(){return 1===arguments.length&&"string"==typeof arguments[0]?i("Symbol").for(arguments[0]):o.apply(null,arguments).get("symbol",i("Symbol"))}})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(35);e({target:"Map",proto:!0,real:!0,forced:o},{deleteAll:function(){return i.apply(this,arguments)}})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(1),u=n(6),a=n(14),c=n(3);e({target:"Map",proto:!0,real:!0,forced:o},{every:function(t){var r=i(this),n=a(r),e=u(t,arguments.length>1?arguments[1]:void 0,3);return!c(n,(function(t,n){if(!e(n,t,r))return c.stop()}),void 0,!0,!0).stopped}})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(5),u=n(1),a=n(4),c=n(6),f=n(15),s=n(14),l=n(3);e({target:"Map",proto:!0,real:!0,forced:o},{filter:function(t){var r=u(this),n=s(r),e=c(t,arguments.length>1?arguments[1]:void 0,3),o=new(f(r,i("Map"))),v=a(o.set);return l(n,(function(t,n){e(n,t,r)&&v.call(o,t,n)}),void 0,!0,!0),o}})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(1),u=n(6),a=n(14),c=n(3);e({target:"Map",proto:!0,real:!0,forced:o},{find:function(t){var r=i(this),n=a(r),e=u(t,arguments.length>1?arguments[1]:void 0,3);return c(n,(function(t,n){if(e(n,t,r))return c.stop(n)}),void 0,!0,!0).result}})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(1),u=n(6),a=n(14),c=n(3);e({target:"Map",proto:!0,real:!0,forced:o},{findKey:function(t){var r=i(this),n=a(r),e=u(t,arguments.length>1?arguments[1]:void 0,3);return c(n,(function(t,n){if(e(n,t,r))return c.stop(t)}),void 0,!0,!0).result}})},function(t,r,n){n(0)({target:"Map",stat:!0},{from:n(37)})},function(t,r,n){"use strict";var e=n(0),o=n(3),i=n(4);e({target:"Map",stat:!0},{groupBy:function(t,r){var n=new this;i(r);var e=i(n.has),u=i(n.get),a=i(n.set);return o(t,(function(t){var o=r(t);e.call(n,o)?u.call(n,o).push(t):a.call(n,o,[t])})),n}})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(1),u=n(14),a=n(112),c=n(3);e({target:"Map",proto:!0,real:!0,forced:o},{includes:function(t){return c(u(i(this)),(function(r,n){if(a(n,t))return c.stop()}),void 0,!0,!0).stopped}})},function(t,r){t.exports=function(t,r){return t===r||t!=t&&r!=r}},function(t,r,n){"use strict";var e=n(0),o=n(3),i=n(4);e({target:"Map",stat:!0},{keyBy:function(t,r){var n=new this;i(r);var e=i(n.set);return o(t,(function(t){e.call(n,r(t),t)})),n}})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(1),u=n(14),a=n(3);e({target:"Map",proto:!0,real:!0,forced:o},{keyOf:function(t){return a(u(i(this)),(function(r,n){if(n===t)return a.stop(r)}),void 0,!0,!0).result}})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(5),u=n(1),a=n(4),c=n(6),f=n(15),s=n(14),l=n(3);e({target:"Map",proto:!0,real:!0,forced:o},{mapKeys:function(t){var r=u(this),n=s(r),e=c(t,arguments.length>1?arguments[1]:void 0,3),o=new(f(r,i("Map"))),v=a(o.set);return l(n,(function(t,n){v.call(o,e(n,t,r),n)}),void 0,!0,!0),o}})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(5),u=n(1),a=n(4),c=n(6),f=n(15),s=n(14),l=n(3);e({target:"Map",proto:!0,real:!0,forced:o},{mapValues:function(t){var r=u(this),n=s(r),e=c(t,arguments.length>1?arguments[1]:void 0,3),o=new(f(r,i("Map"))),v=a(o.set);return l(n,(function(t,n){v.call(o,t,e(n,t,r))}),void 0,!0,!0),o}})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(1),u=n(4),a=n(3);e({target:"Map",proto:!0,real:!0,forced:o},{merge:function(t){for(var r=i(this),n=u(r.set),e=0;e<arguments.length;)a(arguments[e++],n,r,!0);return r}})},function(t,r,n){n(0)({target:"Map",stat:!0},{of:n(38)})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(1),u=n(4),a=n(14),c=n(3);e({target:"Map",proto:!0,real:!0,forced:o},{reduce:function(t){var r,n,e=i(this),o=a(e);if(u(t),arguments.length>1)r=arguments[1];else{if((n=o.next()).done)throw TypeError("Reduce of empty map with no initial value");r=n.value[1]}return c(o,(function(n,o){r=t(r,o,n,e)}),void 0,!0,!0),r}})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(1),u=n(6),a=n(14),c=n(3);e({target:"Map",proto:!0,real:!0,forced:o},{some:function(t){var r=i(this),n=a(r),e=u(t,arguments.length>1?arguments[1]:void 0,3);return c(n,(function(t,n){if(e(n,t,r))return c.stop()}),void 0,!0,!0).stopped}})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(1),u=n(4);e({target:"Map",proto:!0,real:!0,forced:o},{update:function(t,r){var n=i(this),e=arguments.length;u(r);var o=n.has(t);if(!o&&e<3)throw TypeError("Updating absent value");var a=o?n.get(t):u(e>2?arguments[2]:void 0)(t,n);return n.set(t,r(a,t,n)),n}})},function(t,r,n){var e=n(0),o=Math.min,i=Math.max;e({target:"Math",stat:!0},{clamp:function(t,r,n){return o(n,i(r,t))}})},function(t,r,n){n(0)({target:"Math",stat:!0},{DEG_PER_RAD:Math.PI/180})},function(t,r,n){var e=n(0),o=180/Math.PI;e({target:"Math",stat:!0},{degrees:function(t){return t*o}})},function(t,r,n){var e=n(0),o=n(69),i=n(126);e({target:"Math",stat:!0},{fscale:function(t,r,n,e,u){return i(o(t,r,n,e,u))}})},function(t,r,n){var e=n(127),o=Math.abs,i=Math.pow,u=i(2,-52),a=i(2,-23),c=i(2,127)*(2-a),f=i(2,-126);t.exports=Math.fround||function(t){var r,n,i=o(t),s=e(t);return i<f?s*(i/f/a+1/u-1/u)*f*a:(n=(r=(1+a/u)*i)-(r-i))>c||n!=n?s*(1/0):s*n}},function(t,r){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,r,n){n(0)({target:"Math",stat:!0},{iaddh:function(t,r,n,e){var o=t>>>0,i=n>>>0;return(r>>>0)+(e>>>0)+((o&i|(o|i)&~(o+i>>>0))>>>31)|0}})},function(t,r,n){n(0)({target:"Math",stat:!0},{imulh:function(t,r){var n=+t,e=+r,o=65535&n,i=65535&e,u=n>>16,a=e>>16,c=(u*i>>>0)+(o*i>>>16);return u*a+(c>>16)+((o*a>>>0)+(65535&c)>>16)}})},function(t,r,n){n(0)({target:"Math",stat:!0},{isubh:function(t,r,n,e){var o=t>>>0,i=n>>>0;return(r>>>0)-(e>>>0)-((~o&i|~(o^i)&o-i>>>0)>>>31)|0}})},function(t,r,n){n(0)({target:"Math",stat:!0},{RAD_PER_DEG:180/Math.PI})},function(t,r,n){var e=n(0),o=Math.PI/180;e({target:"Math",stat:!0},{radians:function(t){return t*o}})},function(t,r,n){n(0)({target:"Math",stat:!0},{scale:n(69)})},function(t,r,n){var e=n(0),o=n(1),i=n(135),u=n(47),a=n(18),c=a.set,f=a.getterFor("Seeded Random Generator"),s=u((function(t){c(this,{type:"Seeded Random Generator",seed:t%2147483647})}),"Seeded Random",(function(){var t=f(this);return{value:(1073741823&(t.seed=(1103515245*t.seed+12345)%2147483647))/1073741823,done:!1}}));e({target:"Math",stat:!0,forced:!0},{seededPRNG:function(t){var r=o(t).seed;if(!i(r))throw TypeError('Math.seededPRNG() argument should have a "seed" field with a finite value.');return new s(r)}})},function(t,r,n){var e=n(7).isFinite;t.exports=Number.isFinite||function(t){return"number"==typeof t&&e(t)}},function(t,r,n){n(0)({target:"Math",stat:!0},{signbit:function(t){return(t=+t)!=t?t:0==t?1/t==1/0:t>0}})},function(t,r,n){n(0)({target:"Math",stat:!0},{umulh:function(t,r){var n=+t,e=+r,o=65535&n,i=65535&e,u=n>>>16,a=e>>>16,c=(u*i>>>0)+(o*i>>>16);return u*a+(c>>>16)+((o*a>>>0)+(65535&c)>>>16)}})},function(t,r,n){"use strict";var e=n(0),o=n(29),i=n(139),u=/^[\da-z]+$/;e({target:"Number",stat:!0},{fromString:function(t,r){var n,e,a=1;if("string"!=typeof t)throw TypeError("Invalid number representation");if(!t.length)throw SyntaxError("Invalid number representation");if("-"==t.charAt(0)&&(a=-1,!(t=t.slice(1)).length))throw SyntaxError("Invalid number representation");if((n=void 0===r?10:o(r))<2||n>36)throw RangeError("Invalid radix");if(!u.test(t)||(e=i(t,n)).toString(n)!==t)throw SyntaxError("Invalid number representation");return a*e}})},function(t,r,n){var e=n(7),o=n(140).trim,i=n(70),u=e.parseInt,a=/^[+-]?0[Xx]/,c=8!==u(i+"08")||22!==u(i+"0x16");t.exports=c?function(t,r){var n=o(String(t));return u(n,r>>>0||(a.test(n)?16:10))}:u},function(t,r,n){var e=n(20),o="["+n(70)+"]",i=RegExp("^"+o+o+"*"),u=RegExp(o+o+"*$"),a=function(t){return function(r){var n=String(e(r));return 1&t&&(n=n.replace(i,"")),2&t&&(n=n.replace(u,"")),n}};t.exports={start:a(1),end:a(2),trim:a(3)}},function(t,r,n){"use strict";var e=n(0),o=n(12),i=n(67),u=n(4),a=n(1),c=n(9),f=n(33),s=n(11).f,l=n(13),v=n(34),p=n(36),d=n(3),h=n(142),g=n(8),y=n(18),x=g("observable"),b=y.get,m=y.set,w=function(t){return null==t?void 0:u(t)},S=function(t){var r=t.cleanup;if(r){t.cleanup=void 0;try{r()}catch(t){h(t)}}},O=function(t){return void 0===t.observer},M=function(t,r){if(!o){t.closed=!0;var n=r.subscriptionObserver;n&&(n.closed=!0)}r.observer=void 0},j=function(t,r){var n,e=m(this,{cleanup:void 0,observer:a(t),subscriptionObserver:void 0});o||(this.closed=!1);try{(n=w(t.start))&&n.call(t,this)}catch(t){h(t)}if(!O(e)){var i=e.subscriptionObserver=new E(this);try{var c=r(i),f=c;null!=c&&(e.cleanup="function"==typeof c.unsubscribe?function(){f.unsubscribe()}:u(c))}catch(t){return void i.error(t)}O(e)&&S(e)}};j.prototype=v({},{unsubscribe:function(){var t=b(this);O(t)||(M(this,t),S(t))}}),o&&s(j.prototype,"closed",{configurable:!0,get:function(){return O(b(this))}});var E=function(t){m(this,{subscription:t}),o||(this.closed=!1)};E.prototype=v({},{next:function(t){var r=b(b(this).subscription);if(!O(r)){var n=r.observer;try{var e=w(n.next);e&&e.call(n,t)}catch(t){h(t)}}},error:function(t){var r=b(this).subscription,n=b(r);if(!O(n)){var e=n.observer;M(r,n);try{var o=w(e.error);o?o.call(e,t):h(t)}catch(t){h(t)}S(n)}},complete:function(){var t=b(this).subscription,r=b(t);if(!O(r)){var n=r.observer;M(t,r);try{var e=w(n.complete);e&&e.call(n)}catch(t){h(t)}S(r)}}}),o&&s(E.prototype,"closed",{configurable:!0,get:function(){return O(b(b(this).subscription))}});var A=function(t){f(this,A,"Observable"),m(this,{subscriber:u(t)})};v(A.prototype,{subscribe:function(t){var r=arguments.length;return new j("function"==typeof t?{next:t,error:r>1?arguments[1]:void 0,complete:r>2?arguments[2]:void 0}:c(t)?t:{},b(this).subscriber)}}),v(A,{from:function(t){var r="function"==typeof this?this:A,n=w(a(t)[x]);if(n){var e=a(n.call(t));return e.constructor===r?e:new r((function(t){return e.subscribe(t)}))}var o=p(t);return new r((function(t){d(o,(function(r){if(t.next(r),t.closed)return d.stop()}),void 0,!1,!0),t.complete()}))},of:function(){for(var t="function"==typeof this?this:A,r=arguments.length,n=new Array(r),e=0;e<r;)n[e]=arguments[e++];return new t((function(t){for(var e=0;e<r;e++)if(t.next(n[e]),t.closed)return;t.complete()}))}}),l(A.prototype,x,(function(){return this})),e({global:!0},{Observable:A}),i("Observable")},function(t,r,n){var e=n(7);t.exports=function(t,r){var n=e.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,r))}},function(t,r,n){"use strict";var e=n(0),o=n(4),i=n(48),u=n(49),a=n(3);e({target:"Promise",stat:!0},{allSettled:function(t){var r=this,n=i.f(r),e=n.resolve,c=n.reject,f=u((function(){var n=o(r.resolve),i=[],u=0,c=1;a(t,(function(t){var o=u++,a=!1;i.push(void 0),c++,n.call(r,t).then((function(t){a||(a=!0,i[o]={status:"fulfilled",value:t},--c||e(i))}),(function(t){a||(a=!0,i[o]={status:"rejected",reason:t},--c||e(i))}))})),--c||e(i)}));return f.error&&c(f.value),n.promise}})},function(t,r,n){"use strict";var e=n(0),o=n(4),i=n(5),u=n(48),a=n(49),c=n(3);e({target:"Promise",stat:!0},{any:function(t){var r=this,n=u.f(r),e=n.resolve,f=n.reject,s=a((function(){var n=o(r.resolve),u=[],a=0,s=1,l=!1;c(t,(function(t){var o=a++,c=!1;u.push(void 0),s++,n.call(r,t).then((function(t){c||l||(l=!0,e(t))}),(function(t){c||l||(c=!0,u[o]=t,--s||f(new(i("AggregateError"))(u,"No one promise resolved")))}))})),--s||f(new(i("AggregateError"))(u,"No one promise resolved"))}));return s.error&&f(s.value),n.promise}})},function(t,r,n){"use strict";var e=n(0),o=n(48),i=n(49);e({target:"Promise",stat:!0},{try:function(t){var r=o.f(this),n=i(t);return(n.error?r.reject:r.resolve)(n.value),r.promise}})},function(t,r,n){var e=n(0),o=n(16),i=n(1),u=o.toKey,a=o.set;e({target:"Reflect",stat:!0},{defineMetadata:function(t,r,n){var e=arguments.length<4?void 0:u(arguments[3]);a(t,r,i(n),e)}})},function(t,r,n){var e=n(0),o=n(16),i=n(1),u=o.toKey,a=o.getMap,c=o.store;e({target:"Reflect",stat:!0},{deleteMetadata:function(t,r){var n=arguments.length<3?void 0:u(arguments[2]),e=a(i(r),n,!1);if(void 0===e||!e.delete(t))return!1;if(e.size)return!0;var o=c.get(r);return o.delete(n),!!o.size||c.delete(r)}})},function(t,r,n){var e=n(0),o=n(16),i=n(1),u=n(21),a=o.has,c=o.get,f=o.toKey,s=function(t,r,n){if(a(t,r,n))return c(t,r,n);var e=u(r);return null!==e?s(t,e,n):void 0};e({target:"Reflect",stat:!0},{getMetadata:function(t,r){var n=arguments.length<3?void 0:f(arguments[2]);return s(t,i(r),n)}})},function(t,r,n){var e=n(0),o=n(150),i=n(16),u=n(1),a=n(21),c=n(3),f=i.keys,s=i.toKey,l=function(t,r){var n=f(t,r),e=a(t);if(null===e)return n;var i,u,s=l(e,r);return s.length?n.length?(i=new o(n.concat(s)),c(i,(u=[]).push,u),u):s:n};e({target:"Reflect",stat:!0},{getMetadataKeys:function(t){var r=arguments.length<2?void 0:s(arguments[1]);return l(u(t),r)}})},function(t,r,n){"use strict";var e=n(45),o=n(65);t.exports=e("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),o)},function(t,r,n){var e=n(0),o=n(16),i=n(1),u=o.get,a=o.toKey;e({target:"Reflect",stat:!0},{getOwnMetadata:function(t,r){var n=arguments.length<3?void 0:a(arguments[2]);return u(t,i(r),n)}})},function(t,r,n){var e=n(0),o=n(16),i=n(1),u=o.keys,a=o.toKey;e({target:"Reflect",stat:!0},{getOwnMetadataKeys:function(t){var r=arguments.length<2?void 0:a(arguments[1]);return u(i(t),r)}})},function(t,r,n){var e=n(0),o=n(16),i=n(1),u=n(21),a=o.has,c=o.toKey,f=function(t,r,n){if(a(t,r,n))return!0;var e=u(r);return null!==e&&f(t,e,n)};e({target:"Reflect",stat:!0},{hasMetadata:function(t,r){var n=arguments.length<3?void 0:c(arguments[2]);return f(t,i(r),n)}})},function(t,r,n){var e=n(0),o=n(16),i=n(1),u=o.has,a=o.toKey;e({target:"Reflect",stat:!0},{hasOwnMetadata:function(t,r){var n=arguments.length<3?void 0:a(arguments[2]);return u(t,i(r),n)}})},function(t,r,n){var e=n(0),o=n(16),i=n(1),u=o.toKey,a=o.set;e({target:"Reflect",stat:!0},{metadata:function(t,r){return function(n,e){a(t,r,i(n),u(e))}}})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(71);e({target:"Set",proto:!0,real:!0,forced:o},{addAll:function(){return i.apply(this,arguments)}})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(35);e({target:"Set",proto:!0,real:!0,forced:o},{deleteAll:function(){return i.apply(this,arguments)}})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(5),u=n(1),a=n(4),c=n(15),f=n(3);e({target:"Set",proto:!0,real:!0,forced:o},{difference:function(t){var r=u(this),n=new(c(r,i("Set")))(r),e=a(n.delete);return f(t,(function(t){e.call(n,t)})),n}})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(1),u=n(6),a=n(19),c=n(3);e({target:"Set",proto:!0,real:!0,forced:o},{every:function(t){var r=i(this),n=a(r),e=u(t,arguments.length>1?arguments[1]:void 0,3);return!c(n,(function(t){if(!e(t,t,r))return c.stop()}),void 0,!1,!0).stopped}})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(5),u=n(1),a=n(4),c=n(6),f=n(15),s=n(19),l=n(3);e({target:"Set",proto:!0,real:!0,forced:o},{filter:function(t){var r=u(this),n=s(r),e=c(t,arguments.length>1?arguments[1]:void 0,3),o=new(f(r,i("Set"))),v=a(o.add);return l(n,(function(t){e(t,t,r)&&v.call(o,t)}),void 0,!1,!0),o}})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(1),u=n(6),a=n(19),c=n(3);e({target:"Set",proto:!0,real:!0,forced:o},{find:function(t){var r=i(this),n=a(r),e=u(t,arguments.length>1?arguments[1]:void 0,3);return c(n,(function(t){if(e(t,t,r))return c.stop(t)}),void 0,!1,!0).result}})},function(t,r,n){n(0)({target:"Set",stat:!0},{from:n(37)})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(5),u=n(1),a=n(4),c=n(15),f=n(3);e({target:"Set",proto:!0,real:!0,forced:o},{intersection:function(t){var r=u(this),n=new(c(r,i("Set"))),e=a(r.has),o=a(n.add);return f(t,(function(t){e.call(r,t)&&o.call(n,t)})),n}})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(1),u=n(4),a=n(3);e({target:"Set",proto:!0,real:!0,forced:o},{isDisjointFrom:function(t){var r=i(this),n=u(r.has);return!a(t,(function(t){if(!0===n.call(r,t))return a.stop()})).stopped}})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(5),u=n(1),a=n(4),c=n(36),f=n(3);e({target:"Set",proto:!0,real:!0,forced:o},{isSubsetOf:function(t){var r=c(this),n=u(t),e=n.has;return"function"!=typeof e&&(n=new(i("Set"))(t),e=a(n.has)),!f(r,(function(t){if(!1===e.call(n,t))return f.stop()}),void 0,!1,!0).stopped}})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(1),u=n(4),a=n(3);e({target:"Set",proto:!0,real:!0,forced:o},{isSupersetOf:function(t){var r=i(this),n=u(r.has);return!a(t,(function(t){if(!1===n.call(r,t))return a.stop()})).stopped}})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(1),u=n(19),a=n(3);e({target:"Set",proto:!0,real:!0,forced:o},{join:function(t){var r=i(this),n=u(r),e=void 0===t?",":String(t),o=[];return a(n,o.push,o,!1,!0),o.join(e)}})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(5),u=n(1),a=n(4),c=n(6),f=n(15),s=n(19),l=n(3);e({target:"Set",proto:!0,real:!0,forced:o},{map:function(t){var r=u(this),n=s(r),e=c(t,arguments.length>1?arguments[1]:void 0,3),o=new(f(r,i("Set"))),v=a(o.add);return l(n,(function(t){v.call(o,e(t,t,r))}),void 0,!1,!0),o}})},function(t,r,n){n(0)({target:"Set",stat:!0},{of:n(38)})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(1),u=n(4),a=n(19),c=n(3);e({target:"Set",proto:!0,real:!0,forced:o},{reduce:function(t){var r,n,e=i(this),o=a(e);if(u(t),arguments.length>1)r=arguments[1];else{if((n=o.next()).done)throw TypeError("Reduce of empty set with no initial value");r=n.value}return c(o,(function(n){r=t(r,n,n,e)}),void 0,!1,!0),r}})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(1),u=n(6),a=n(19),c=n(3);e({target:"Set",proto:!0,real:!0,forced:o},{some:function(t){var r=i(this),n=a(r),e=u(t,arguments.length>1?arguments[1]:void 0,3);return c(n,(function(t){if(e(t,t,r))return c.stop()}),void 0,!1,!0).stopped}})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(5),u=n(1),a=n(4),c=n(15),f=n(3);e({target:"Set",proto:!0,real:!0,forced:o},{symmetricDifference:function(t){var r=u(this),n=new(c(r,i("Set")))(r),e=a(n.delete),o=a(n.add);return f(t,(function(t){e.call(n,t)||o.call(n,t)})),n}})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(5),u=n(1),a=n(4),c=n(15),f=n(3);e({target:"Set",proto:!0,real:!0,forced:o},{union:function(t){var r=u(this),n=new(c(r,i("Set")))(r);return f(t,a(n.add),n),n}})},function(t,r,n){"use strict";var e=n(0),o=n(72).charAt;e({target:"String",proto:!0},{at:function(t){return o(this,t)}})},function(t,r,n){"use strict";var e=n(0),o=n(47),i=n(20),u=n(18),a=n(72),c=a.codeAt,f=a.charAt,s=u.set,l=u.getterFor("String Iterator"),v=o((function(t){s(this,{type:"String Iterator",string:t,index:0})}),"String",(function(){var t,r=l(this),n=r.string,e=r.index;return e>=n.length?{value:void 0,done:!0}:(t=f(n,e),r.index+=t.length,{value:{codePoint:c(t,0),position:e},done:!1})}));e({target:"String",proto:!0},{codePoints:function(){return new v(String(i(this)))}})},function(t,r,n){"use strict";var e=n(0),o=n(13),i=n(20),u=n(1),a=n(177),c=n(178),f=n(15),s=n(8),l=n(2),v=s("replaceAll"),p=RegExp.prototype,d=function(t,r){var n=u(this),e=String("flags"in p?n.flags:c.call(n));return~e.indexOf("g")||(n=new(f(n,RegExp))(n.source,e+"g")),String(t).replace(n,r)};e({target:"String",proto:!0},{replaceAll:function(t,r){var n,e,o,u,c,f,s=i(this);if(null!=t){if(void 0!==(n=t[v]))return n.call(t,s,r);if(l&&a(t))return d.call(t,s,r)}if(e=String(s),o=String(t),u=e.split(o),"function"!=typeof r)return u.join(String(r));for(c=u[0],f=1;f<u.length;f++)c+=String(r(o,f-1,e)),c+=u[f];return c}}),l||v in p||o(p,v,d)},function(t,r,n){var e=n(9),o=n(26),i=n(8)("match");t.exports=function(t){var r;return e(t)&&(void 0!==(r=t[i])?!!r:"RegExp"==o(t))}},function(t,r,n){"use strict";var e=n(1);t.exports=function(){var t=e(this),r="";return t.global&&(r+="g"),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.dotAll&&(r+="s"),t.unicode&&(r+="u"),t.sticky&&(r+="y"),r}},function(t,r,n){n(50)("dispose")},function(t,r,n){r.f=n(8)},function(t,r,n){n(50)("observable")},function(t,r,n){n(50)("patternMatch")},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(35);e({target:"WeakMap",proto:!0,real:!0,forced:o},{deleteAll:function(){return i.apply(this,arguments)}})},function(t,r,n){n(0)({target:"WeakMap",stat:!0},{from:n(37)})},function(t,r,n){n(0)({target:"WeakMap",stat:!0},{of:n(38)})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(71);e({target:"WeakSet",proto:!0,real:!0,forced:o},{addAll:function(){return i.apply(this,arguments)}})},function(t,r,n){"use strict";var e=n(0),o=n(2),i=n(35);e({target:"WeakSet",proto:!0,real:!0,forced:o},{deleteAll:function(){return i.apply(this,arguments)}})},function(t,r,n){n(0)({target:"WeakSet",stat:!0},{from:n(37)})},function(t,r,n){n(0)({target:"WeakSet",stat:!0},{of:n(38)})}]);