{"code":"icpc21workersroadmap","name":"Workers Roadmap","description":"A business received a big order for $M$ products, they must deliver as soon as possible but there is nothing left in the\r\nwarehouse, they have to produce from scratch. They have $N$ workers, worker $i$ produce $A_i$ products every day but take\r\n$1$ day of leave after every $B_i$ days of work. Calculate what’s the earliest day they can finish producing $M$ products to\r\ndeliver.\r\n\r\n<h4>Input</h4>\r\n\r\n- The first line of input contains 2 integers $N$ and $M$ $(1 \\le  N \\le  100, 1 \\le  M \\le  10^{15})$, the number of workers and\r\nnumber of products ordered.\r\n- The next $N$ lines, each has 2 numbers $A_i$ and $B_i (1 \\le  A_i, B_i \\le  10^{15})$.\r\n\r\n<h4>Output</h4>\r\n\r\n- Output one integer, the number of days it take.\r\n\r\n<h4>Example</h4>\r\n\r\n!!! question \"Test 1\"\r\n\r\n    ???+ \"Input\"\r\n        ```sample\r\n        2 30\r\n        2 5\r\n        1 9\r\n        ```\r\n    \r\n    ???+ success \"Output\"\r\n        ```sample\r\n        11\r\n        ```","points":1600.0,"partial":false,"time_limit":1.0,"memory_limit":262144,"short_circuit":false,"allowed_languages":[3,4,34,36,37,5,6,11,12,14,28,2,38,39,9,18,17,29,23,27,35,25,26,10,7,19,32,1,8,15,16,24,20,33,13,41,21,40],"is_public":true,"is_manually_managed":false,"permissions":{"can_edit":false}}