function main(input) { let [L, R, M, K] = getIntegers(input, " "); if(L == 0n || R == 0n || K == 0n) { console.log("Yes"); return; } let val = M; let left = L*K; let right = R*K; while(true) { let ret = binary(val, left, right); if(ret % M == 0n) { console.log("Yes"); return; } if(val > 10e9) break; val *= 2n; } console.log("No"); } function binary(M, l=0, r=this.length) { l--; while(r - l > 1n) { let x = (r + l) / 2n; let V = x % M; x >= M ? r = x : l = x; } return r; } //-- functions ------------------------------------ function getIntegers(lines, sep) { if(sep === undefined) { return lines.map(function(e) { return BigInt(e); }); } else { return lines.shift().split(sep).map(function(e) { return BigInt(e); }); } } function getStrings(lines, sep=" ") { return lines.shift().split(sep); } function twoDimenArrayByValue(h, w, value) { const list = new Array(h); for(let i=0; i 1) { let x = Math.floor((r + l) / 2); this[x] > V ? r = x : l = x; } return r; }; Array.prototype.lessThen = function(V, l=0, r=this.length) { l--; while(r - l > 1) { let x = Math.floor((r + l) / 2); this[x] >= V ? r = x : l = x; } return r; }; Array.prototype.orHigher = function(V, l, r) { return this.length - this.lessThen(V, l, r); }; Array.prototype.greaterThan = function(V, l, r) { return this.length - this.orLess(V, l, r); }; Array.prototype.deepCopy = function(list) { let retList = []; for(let i=0; i