/*!
 * path: atcoder/abc155/d
 * URL: https://github.com/koukimetal/procomvis/tree/master/src/contest/atcoder/abc155/d
 */!function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=0)}([function(e,r,t){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};r.__esModule=!0;var o=n(t(1)),i=t(2);o.default.readFile("/dev/stdin","utf8",(function(e,r){!function(e){var r=new i.Solver,t=r.parse(e),n=r.solve(t);r.print(n)}(r)}))},function(e,r){e.exports=require("fs")},function(e,r,t){"use strict";var n,o=this&&this.__extends||(n=function(e,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)r.hasOwnProperty(t)&&(e[t]=r[t])})(e,r)},function(e,r){function t(){this.constructor=e}n(e,r),e.prototype=null===r?Object.create(r):(t.prototype=r.prototype,new t)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};r.__esModule=!0;var s=t(3),u=t(4),f=i(t(5)),c=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return o(r,e),r.prototype.solve=function(e){var r=e.N,t=e.K,n=e.A;n.sort((function(e,r){return e-r}));for(var o=new Array(r),i=0;i<r;i++)o[i]=new f.default(n[i]);var s=0,u=0,c=0;for(i=0;i<r;i++)n[i]<0?s++:n[i]>0?u++:c++;for(var l=s*u,a=c*(u+s)+c*(c-1)/2,h=new f.default(1),p=new f.default(0),v=new f.default("-1000000000000000005"),d=new f.default("1000000000000000005");d.minus(v).gt(h);){var g=d.plus(v).div(2).round(),w=0;if(g.lt(p))for(i=0;i<r&&!(n[i]>=0);i++){for(var b=s+c-1,y=r;y-b>1;){var m=(b+y)/2|0;o[i].mul(o[m]).lt(g)?y=m:b=m}w+=r-y}else if(g.gt(p)){w+=l+a;for(i=0;i<r;i++)if(n[i]<0){for(b=i,y=s;y-b>1;){m=(b+y)/2|0;o[i].mul(o[m]).lt(g)?y=m:b=m}w+=s-y}else if(n[i]>0){for(b=i,y=r;y-b>1;){m=(b+y)/2|0;o[i].mul(o[m]).lt(g)?b=m:y=m}w+=b-i}}else w=l;w<t?v=g:d=g}return{answer:v}},r.prototype.parse=function(e){for(var r=u.getSpaceIterator(e,(function(e){return parseInt(e)})),t=r.next().value,n=r.next().value,o=[],i=0;i<t;i++)o.push(r.next().value);return{N:t,K:n,A:o}},r.prototype.print=function(e){console.log(e.answer.toString())},r}(s.SolverBase);r.Solver=c},function(e,r,t){"use strict";r.__esModule=!0;var n=function(){};r.SolverBase=n},function(e,r,t){"use strict";var n=this&&this.__generator||function(e,r){var t,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=r.call(e,s)}catch(e){i=[6,e],n=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};r.__esModule=!0,r.getSpaceIterator=function(e,r){var t,o;return n(this,(function(n){switch(n.label){case 0:t=0,o=e.split(/\s+/).map((function(e){return r(e)})),n.label=1;case 1:return t<o.length?[4,o[t]]:[3,4];case 2:n.sent(),n.label=3;case 3:return t++,[3,1];case 4:return[2,void 0]}}))}},function(e,r,t){"use strict";t.r(r),t.d(r,"Big",(function(){return l}));var n="[big.js] ",o=n+"Invalid ",i=o+"decimal places",s={},u=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function f(e,r,t,n){var o=e.c,i=e.e+r+1;if(i<o.length){if(1===t)n=o[i]>=5;else if(2===t)n=o[i]>5||5==o[i]&&(n||i<0||void 0!==o[i+1]||1&o[i-1]);else if(3===t)n=n||!!o[0];else if(n=!1,0!==t)throw Error("[big.js] Invalid rounding mode");if(i<1)o.length=1,n?(e.e=-r,o[0]=1):o[0]=e.e=0;else{if(o.length=i--,n)for(;++o[i]>9;)o[i]=0,i--||(++e.e,o.unshift(1));for(i=o.length;!o[--i];)o.pop()}}else if(t<0||t>3||t!==~~t)throw Error("[big.js] Invalid rounding mode");return e}function c(e,r,t,n){var s,u,c=e.constructor,l=!e.c[0];if(void 0!==t){if(t!==~~t||t<(3==r)||t>1e6)throw Error(3==r?o+"precision":i);for(t=n-(e=new c(e)).e,e.c.length>++n&&f(e,t,c.RM),2==r&&(n=e.e+t+1);e.c.length<n;)e.c.push(0)}if(s=e.e,t=(u=e.c.join("")).length,2!=r&&(1==r||3==r&&n<=s||s<=c.NE||s>=c.PE))u=u.charAt(0)+(t>1?"."+u.slice(1):"")+(s<0?"e":"e+")+s;else if(s<0){for(;++s;)u="0"+u;u="0."+u}else if(s>0)if(++s>t)for(s-=t;s--;)u+="0";else s<t&&(u=u.slice(0,s)+"."+u.slice(s));else t>1&&(u=u.charAt(0)+"."+u.slice(1));return e.s<0&&(!l||4==r)?"-"+u:u}s.abs=function(){var e=new this.constructor(this);return e.s=1,e},s.cmp=function(e){var r,t=this,n=t.c,o=(e=new t.constructor(e)).c,i=t.s,s=e.s,u=t.e,f=e.e;if(!n[0]||!o[0])return n[0]?i:o[0]?-s:0;if(i!=s)return i;if(r=i<0,u!=f)return u>f^r?1:-1;for(s=(u=n.length)<(f=o.length)?u:f,i=-1;++i<s;)if(n[i]!=o[i])return n[i]>o[i]^r?1:-1;return u==f?0:u>f^r?1:-1},s.div=function(e){var r=this,t=r.constructor,n=r.c,o=(e=new t(e)).c,s=r.s==e.s?1:-1,u=t.DP;if(u!==~~u||u<0||u>1e6)throw Error(i);if(!o[0])throw Error("[big.js] Division by zero");if(!n[0])return new t(0*s);var c,l,a,h,p,v=o.slice(),d=c=o.length,g=n.length,w=n.slice(0,c),b=w.length,y=e,m=y.c=[],_=0,M=u+(y.e=r.e-e.e)+1;for(y.s=s,s=M<0?0:M,v.unshift(0);b++<c;)w.push(0);do{for(a=0;a<10;a++){if(c!=(b=w.length))h=c>b?1:-1;else for(p=-1,h=0;++p<c;)if(o[p]!=w[p]){h=o[p]>w[p]?1:-1;break}if(!(h<0))break;for(l=b==c?o:v;b;){if(w[--b]<l[b]){for(p=b;p&&!w[--p];)w[p]=9;--w[p],w[b]+=10}w[b]-=l[b]}for(;!w[0];)w.shift()}m[_++]=h?a:++a,w[0]&&h?w[b]=n[d]||0:w=[n[d]]}while((d++<g||void 0!==w[0])&&s--);return m[0]||1==_||(m.shift(),y.e--),_>M&&f(y,u,t.RM,void 0!==w[0]),y},s.eq=function(e){return!this.cmp(e)},s.gt=function(e){return this.cmp(e)>0},s.gte=function(e){return this.cmp(e)>-1},s.lt=function(e){return this.cmp(e)<0},s.lte=function(e){return this.cmp(e)<1},s.minus=s.sub=function(e){var r,t,n,o,i=this,s=i.constructor,u=i.s,f=(e=new s(e)).s;if(u!=f)return e.s=-f,i.plus(e);var c=i.c.slice(),l=i.e,a=e.c,h=e.e;if(!c[0]||!a[0])return a[0]?(e.s=-f,e):new s(c[0]?i:0);if(u=l-h){for((o=u<0)?(u=-u,n=c):(h=l,n=a),n.reverse(),f=u;f--;)n.push(0);n.reverse()}else for(t=((o=c.length<a.length)?c:a).length,u=f=0;f<t;f++)if(c[f]!=a[f]){o=c[f]<a[f];break}if(o&&(n=c,c=a,a=n,e.s=-e.s),(f=(t=a.length)-(r=c.length))>0)for(;f--;)c[r++]=0;for(f=r;t>u;){if(c[--t]<a[t]){for(r=t;r&&!c[--r];)c[r]=9;--c[r],c[t]+=10}c[t]-=a[t]}for(;0===c[--f];)c.pop();for(;0===c[0];)c.shift(),--h;return c[0]||(e.s=1,c=[h=0]),e.c=c,e.e=h,e},s.mod=function(e){var r,t=this,n=t.constructor,o=t.s,i=(e=new n(e)).s;if(!e.c[0])throw Error("[big.js] Division by zero");return t.s=e.s=1,r=1==e.cmp(t),t.s=o,e.s=i,r?new n(t):(o=n.DP,i=n.RM,n.DP=n.RM=0,t=t.div(e),n.DP=o,n.RM=i,this.minus(t.times(e)))},s.plus=s.add=function(e){var r,t=this,n=t.constructor,o=t.s,i=(e=new n(e)).s;if(o!=i)return e.s=-i,t.minus(e);var s=t.e,u=t.c,f=e.e,c=e.c;if(!u[0]||!c[0])return c[0]?e:new n(u[0]?t:0*o);if(u=u.slice(),o=s-f){for(o>0?(f=s,r=c):(o=-o,r=u),r.reverse();o--;)r.push(0);r.reverse()}for(u.length-c.length<0&&(r=c,c=u,u=r),o=c.length,i=0;o;u[o]%=10)i=(u[--o]=u[o]+c[o]+i)/10|0;for(i&&(u.unshift(i),++f),o=u.length;0===u[--o];)u.pop();return e.c=u,e.e=f,e},s.pow=function(e){var r=this,t=new r.constructor(1),n=t,i=e<0;if(e!==~~e||e<-1e6||e>1e6)throw Error(o+"exponent");for(i&&(e=-e);1&e&&(n=n.times(r)),e>>=1;)r=r.times(r);return i?t.div(n):n},s.round=function(e,r){var t=this.constructor;if(void 0===e)e=0;else if(e!==~~e||e<-1e6||e>1e6)throw Error(i);return f(new t(this),e,void 0===r?t.RM:r)},s.sqrt=function(){var e,r,t,o=this,i=o.constructor,s=o.s,u=o.e,c=new i(.5);if(!o.c[0])return new i(o);if(s<0)throw Error(n+"No square root");0===(s=Math.sqrt(o+""))||s===1/0?((r=o.c.join("")).length+u&1||(r+="0"),u=((u+1)/2|0)-(u<0||1&u),e=new i(((s=Math.sqrt(r))==1/0?"1e":(s=s.toExponential()).slice(0,s.indexOf("e")+1))+u)):e=new i(s),u=e.e+(i.DP+=4);do{t=e,e=c.times(t.plus(o.div(t)))}while(t.c.slice(0,u).join("")!==e.c.slice(0,u).join(""));return f(e,i.DP-=4,i.RM)},s.times=s.mul=function(e){var r,t=this,n=t.constructor,o=t.c,i=(e=new n(e)).c,s=o.length,u=i.length,f=t.e,c=e.e;if(e.s=t.s==e.s?1:-1,!o[0]||!i[0])return new n(0*e.s);for(e.e=f+c,s<u&&(r=o,o=i,i=r,c=s,s=u,u=c),r=new Array(c=s+u);c--;)r[c]=0;for(f=u;f--;){for(u=0,c=s+f;c>f;)u=r[c]+i[f]*o[c-f-1]+u,r[c--]=u%10,u=u/10|0;r[c]=(r[c]+u)%10}for(u?++e.e:r.shift(),f=r.length;!r[--f];)r.pop();return e.c=r,e},s.toExponential=function(e){return c(this,1,e,e)},s.toFixed=function(e){return c(this,2,e,this.e+e)},s.toPrecision=function(e){return c(this,3,e,e-1)},s.toString=function(){return c(this)},s.valueOf=s.toJSON=function(){return c(this,4)};var l=function e(){function r(t){var n=this;if(!(n instanceof r))return void 0===t?e():new r(t);t instanceof r?(n.s=t.s,n.e=t.e,n.c=t.c.slice()):function(e,r){var t,n,i;if(0===r&&1/r<0)r="-0";else if(!u.test(r+=""))throw Error(o+"number");e.s="-"==r.charAt(0)?(r=r.slice(1),-1):1,(t=r.indexOf("."))>-1&&(r=r.replace(".",""));(n=r.search(/e/i))>0?(t<0&&(t=n),t+=+r.slice(n+1),r=r.substring(0,n)):t<0&&(t=r.length);for(i=r.length,n=0;n<i&&"0"==r.charAt(n);)++n;if(n==i)e.c=[e.e=0];else{for(;i>0&&"0"==r.charAt(--i););for(e.e=t-n-1,e.c=[],t=0;n<=i;)e.c[t++]=+r.charAt(n++)}}(n,t),n.constructor=r}return r.prototype=s,r.DP=20,r.RM=1,r.NE=-7,r.PE=21,r.version="5.2.2",r}();r.default=l}]);