Problem:
Score: 200 points

Problem Statement

M-kun has the following three cards:

A red card with the integer A.

A green card with the integer B.

A blue card with the integer C.

He is a genius magician who can do the following operation at most K times:

Choose one of the three cards and multiply the written integer by 2.

His magic is successful if both of the following conditions are satisfied after the operations:

The integer on the green card is strictly greater than the integer on the red card.

The integer on the blue card is strictly greater than the integer on the green card.

Determine whether the magic can be successful.

Constraints

1 \leq A, B, C \leq 7

1 \leq K \leq 7

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A B C
K

Output

If the magic can be successful, print Yes; otherwise, print No.

Sample Input 1

7 2 5
3

Sample Output 1

Yes

The magic will be successful if, for example, he does the following operations:

First, choose the blue card. The integers on the red, green, and blue cards are now 7, 2, and 10, respectively.

Second, choose the green card. The integers on the red, green, and blue cards are now 7, 4, and 10, respectively.

Third, choose the green card. The integers on the red, green, and blue cards are now 7, 8, and 10, respectively.

Sample Input 2

7 4 2
3

Sample Output 2

No

He has no way to succeed in the magic with at most three operations.

Solution in JavaScript (Node.js 12.16.1) (judge verdict: Accepted)

/*! path: /home/ts3min/work/tspro/src/contest/atcoder/msol2020/b.ts */!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}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 o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));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";(function(e){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.main=void 0;const o=r(n(2)),u=n(3);function i(e){const t=u.getNextInt(e),n=t(),r=t(),o=t(),i=t();console.log(function({A:e,B:t,C:n,K:r}){let o=0;for(;t<=e;)o++,t*=2;for(;n<=t;)o++,n*=2;return o<=r?"Yes":"No"}({A:n,B:r,C:o,K:i}))}if(t.main=i,n.c[n.s]===e){i(o.default.readFileSync("/dev/stdin","utf8"))}}).call(this,n(1)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){e.exports=require("fs")},function(e,t,n){"use strict";function*r(e){const t=e.split(/\s+/);for(const e of t)yield e}Object.defineProperty(t,"__esModule",{value:!0}),t.getNextBigInt=t.getNextInt=t.getNext=t.getIteratorWithParser=t.getIterator=void 0,t.getIterator=r,t.getIteratorWithParser=function*(e,t){const n=e.split(/\s+/);for(const e of n)yield t(e)},t.getNext=function(e){const t=r(e);return()=>t.next().value},t.getNextInt=function(e){const t=r(e);return()=>parseInt(t.next().value)},t.getNextBigInt=function(e){const t=r(e);return()=>BigInt(t.next().value)}}]);
//# sourceMappingURL=submit.js.map